/* ==========================================================================
   [customer-service-form] — Customer Service form
   Renders Nustore\CustomerService\Forms\Fronts\CustomerServiceForm.
   The submit button, links and required asterisks follow the theme's
   --primary-color so the block re-skins with the rest of the site.
   ========================================================================== */

.cs-service {
    --cs-accent: var(--primary-color, #b32b1c);
    --cs-input-bg: #ebebeb;
    --cs-ink: #1c1c1c;
    --cs-required: #e60000;

    padding: 50px 0 60px;
}

.cs-service .customer-service-form-wrapper {
    max-width: 1140px;
    margin: 0 auto;
}

/* --- Heading ------------------------------------------------------------ */

.cs-service__heading {
    margin: 0 0 14px;
    color: #1a1a1a;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 40px;
    font-weight: 400;
    font-variant: small-caps;
    letter-spacing: 0.5px;
    line-height: 1.15;
    text-align: center;
}

.cs-service__divider {
    display: block;
    width: 70px;
    height: 2px;
    margin: 0 auto 34px;
    background-color: var(--cs-accent);
}

/* --- Intro copy --------------------------------------------------------- */

.cs-service__description {
    margin-bottom: 30px;
    color: var(--cs-ink);
    font-size: 14px;
    line-height: 1.65;
}

.cs-service__description p:last-child {
    margin-bottom: 0;
}

/* --- Layout ------------------------------------------------------------- */

.cs-service .cs-form-group {
    margin-bottom: 20px;
}

/* --- Labels ------------------------------------------------------------- */

.cs-service label.form-label,
.cs-service .cs-form-group > label {
    display: block;
    margin-bottom: 8px;
    color: var(--cs-ink);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

/* The form-builder tags required fields' labels with `.required`. */
.cs-service label.required::after {
    content: '*';
    margin-left: 2px;
    color: var(--cs-required);
    font-size: 13px;
    line-height: 1;
    vertical-align: super;
}

/* --- Inputs ------------------------------------------------------------- */

.cs-service .cs-form-input {
    display: block;
    width: 100%;
    height: 42px;
    padding: 8px 12px;
    background-color: var(--cs-input-bg);
    border: 1px solid transparent;
    border-radius: 0;
    box-shadow: none;
    color: var(--cs-ink);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

/* Height comes from each field's `rows`; this is only a floor. */
.cs-service textarea.cs-form-input {
    height: auto;
    min-height: 130px;
    padding: 12px;
    line-height: 1.5;
    resize: vertical;
}

.cs-service .cs-form-input::placeholder {
    color: #8a8a8a;
}

.cs-service .cs-form-input:focus {
    background-color: #e3e3e3;
    border-color: var(--cs-accent);
}

.cs-service .cs-form-input.is-invalid {
    border-color: var(--cs-required);
}

/* --- Date of purchase: label and input sit on one line ------------------- */

.cs-service .cs-inline-row .cs-form-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.cs-service .cs-inline-row .cs-form-group > label {
    margin-bottom: 0;
}

/* Targeted through the row wrapper, not a modifier class: FormFront
   overwrites `attr.class` on text/date/textarea fields when it renders. */
.cs-service .cs-inline-row .cs-form-input {
    width: auto;
    min-width: 170px;
    height: 34px;
    padding: 4px 8px;
    background-color: #ffffff;
    border-color: #767676;
    font-size: 13px;
}

/* Keep the validation message on its own line under the pair. */
.cs-service .cs-inline-row .cs-form-group > .help-block,
.cs-service .cs-inline-row .cs-form-group > .invalid-feedback,
.cs-service .cs-inline-row .cs-form-group > .text-danger {
    flex-basis: 100%;
}

/* --- reCAPTCHA notice --------------------------------------------------- */

.cs-service .cs-recaptcha-notice,
.cs-service .captcha-disclaimer {
    margin: 4px 0 18px;
    color: var(--cs-ink);
    font-size: 13px;
    line-height: 1.5;
}

/* The captcha plugin ships hard-coded inline styles on its v3 disclaimer —
   strip the grey card so it reads as plain body copy like the design. */
.cs-service .captcha-disclaimer {
    padding: 0 !important;
    background-color: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
}

.cs-service .cs-recaptcha-notice a,
.cs-service .captcha-disclaimer a {
    color: var(--cs-accent);
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    text-decoration: none;
}

.cs-service .cs-recaptcha-notice a:hover,
.cs-service .cs-recaptcha-notice a:focus,
.cs-service .captcha-disclaimer a:hover,
.cs-service .captcha-disclaimer a:focus {
    text-decoration: underline;
}

/* reCAPTCHA v2 renders a widget instead of the disclaimer text. */
.cs-service .g-recaptcha {
    margin-bottom: 18px;
}

/* --- Submit ------------------------------------------------------------- */

.cs-service .cs-field-submit {
    margin-top: 4px;
}

.cs-service .cs-button {
    display: inline-block;
    padding: 14px 30px;
    background-color: var(--cs-accent);
    border: 0;
    border-radius: 0;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.cs-service .cs-button:hover:not(:disabled) {
    filter: brightness(1.15);
}

.cs-service .cs-button:disabled,
.cs-service .cs-button.button-loading {
    opacity: 0.65;
    cursor: not-allowed;
}

/* --- Result messages ---------------------------------------------------- */

.cs-service .cs-message {
    width: 100%;
    margin-top: 18px;
    padding: 14px 16px;
    border-left: 4px solid transparent;
    font-size: 14px;
    line-height: 1.5;
}

.cs-service .cs-success-message {
    background-color: #edf7ed;
    border-left-color: #2e7d32;
    color: #1b5e20;
}

.cs-service .cs-error-message {
    background-color: #fdecea;
    border-left-color: var(--cs-required);
    color: #8d1a13;
}

/* Server-side field errors rendered by the form builder. */
.cs-service .help-block,
.cs-service .invalid-feedback,
.cs-service .text-danger {
    display: block;
    margin-top: 5px;
    color: var(--cs-required);
    font-size: 12px;
}

/* --- Small screens ------------------------------------------------------ */

@media (max-width: 767.98px) {
    .cs-service {
        padding: 34px 0 46px;
    }

    .cs-service__heading {
        font-size: 28px;
    }

    .cs-service__divider {
        margin-bottom: 26px;
    }

    .cs-service .cs-button {
        width: 100%;
    }
}
