/* ============================================================
   Greenwoods Dental – Complaint Form 2025
   Modal-based form stylesheet (namespaced gwc-)
   ============================================================ */

/* ── Reset / base ─────────────────────────────────────────── */
#greenwoods-complaint-form,
#greenwoods-complaint-form * {
    box-sizing: border-box;
}

/* ── Modal overlay ─────────────────────────────────────────── */
.gwc-overlay {
    position: fixed;
    inset: 0;
    background: #1d2f1db5;
    display: none;              /* hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 2147483646;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.gwc-overlay.active {
    display: flex !important;
    opacity: 1;
}

/* ── Modal card ────────────────────────────────────────────── */
.gwcs-modal {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-x: hidden;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
}

/* ── Header ─────────────────────────────────────────────────── */
.gwcs-modal-header {
    background:
        linear-gradient(42deg, rgba(255,255,255,.62), rgba(114,175,90,.58)),
        url('https://file.greenwoodsdental.com/form-modal-header.jpg') center center/cover no-repeat;
    min-height: 52px;
    border-radius: 20px 20px 0 0;
    position: relative;
    flex-shrink: 0;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gwcs-modal-heading {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0,0,0,.3);
}

.gwc-close-btn {
    background: rgba(255,255,255,.25);
    border: 1px solid #fff;
    outline: 1px solid #62b143;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background .15s;
}
.gwc-close-btn:hover { background: rgba(255,255,255,.42); }

/* ── Modal body ────────────────────────────────────────────── */
.gwcs-modal-body {
    padding: 24px 24px 20px;
    flex: 1;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

#greenwoods-complaint-form {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

#complaint-form {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

/* ── Form elements ─────────────────────────────────────────── */
.gwc-section-title {
    font-size: 17px !important;
    font-weight: 600 !important;
    color: #1a2e1a !important;
    margin: 20px 0 12px !important;
    line-height: 1.3 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, sans-serif !important;
}
.gwc-section-title:first-of-type {
    margin-top: 0 !important;
}

.gwc-sub {
    font-size: 13px;
    color: #6b8c6b;
    margin-bottom: 14px;
}

.gwc-field-group {
    margin-bottom: 14px;
}

.gwc-field-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #046937;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 6px;
}

.gwc-req { color: #c00; }
.gwc-optional {
    font-weight: 400;
    color: #9ab99a;
    text-transform: none;
}

.gwc-input,
#greenwoods-complaint-form input[type="text"],
#greenwoods-complaint-form input[type="tel"],
#greenwoods-complaint-form input[type="email"],
#greenwoods-complaint-form input[type="date"],
#greenwoods-complaint-form input[type="time"],
#greenwoods-complaint-form select,
#greenwoods-complaint-form textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border: 1.5px solid #d4e8cb;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 16px;
    color: #1a2e1a;
    outline: none;
    transition: border .15s, box-shadow .15s;
    background: #fff;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    min-height: 2.75rem;
}

#greenwoods-complaint-form input[type="date"],
#greenwoods-complaint-form input[type="time"],
#greenwoods-complaint-form .gwc-datetime-input {
    display: block;
    line-height: 1.4;
}

.gwc-datetime-wrap {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
}

.gwc-datetime-input::-webkit-date-and-time-value {
    text-align: left;
}

.gwc-datetime-input::-webkit-calendar-picker-indicator {
    width: 1.25rem;
    height: 1.25rem;
    opacity: 0.65;
    cursor: pointer;
}

.gwc-datetime-ph {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ab99a;
    pointer-events: none;
    font-size: 16px;
    line-height: 1;
    z-index: 1;
}

.gwc-datetime-input.gwc-is-empty:not(:focus) {
    color: transparent;
}

.gwc-datetime-input.gwc-is-empty:not(:focus)::-webkit-datetime-edit,
.gwc-datetime-input.gwc-is-empty:not(:focus)::-webkit-datetime-edit-fields-wrapper {
    color: transparent;
}

.gwc-datetime-input:not(.gwc-is-empty) + .gwc-datetime-ph,
.gwc-datetime-input:focus + .gwc-datetime-ph {
    display: none;
}
.gwc-input:focus,
#greenwoods-complaint-form input:focus,
#greenwoods-complaint-form select:focus,
#greenwoods-complaint-form textarea:focus {
    border-color: #62b143;
    box-shadow: 0 0 0 3px rgba(98,177,67,.12);
}

#greenwoods-complaint-form textarea {
    resize: vertical;
    min-height: 80px;
}

/* Two-col grid */
.gwc-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.gwc-two-col > .gwc-field-group {
    min-width: 0;
    max-width: 100%;
}

/* Checkbox inline row */
.gwc-checkbox-inline-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.gwc-checkbox-inline {
    font-size: 14px;
    color: #4a6e4a;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.gwc-checkbox-inline input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #046937;
}

/* Upload box */
.gwc-upload-box {
    border: 1.5px dashed #d4e8cb;
    border-radius: 10px;
    padding: 14px;
    background: #fbfef9;
}
.gwc-upload-help {
    font-size: 12px;
    color: #6b8c6b;
    line-height: 1.5;
    margin-bottom: 10px;
}
.gwc-upload-btn {
    border: 1.5px solid #d4e8cb;
    border-radius: 10px;
    padding: 9px 12px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: #4a6e4a;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}
.gwc-upload-btn:hover {
    border-color: #62b143;
    color: #046937;
    background: #f7fdf4;
}
.gwc-files-list {
    margin-top: 10px;
    font-size: 12px;
    color: #6b8c6b;
}
.gwc-files-list .gwc-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}
.gwc-files-list .gwc-del-file {
    background: #f44336;
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 2px 8px;
    cursor: pointer;
}

/* Accordion (details/summary) */
.gwc-accordion {
    border: 1.5px solid #d4e8cb;
    border-radius: 10px;
    margin-bottom: 14px;
    overflow: hidden;
}
.gwc-accordion-summary {
    background: #f7fdf4;
    padding: 12px 16px;
    font-weight: 600;
    color: #046937;
    cursor: pointer;
    outline: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}
.gwc-accordion-summary::-webkit-details-marker { display: none; }
.gwc-accordion-summary::after {
    content: '▸';
    font-size: 16px;
    transition: transform .2s;
}
.gwc-accordion[open] .gwc-accordion-summary::after {
    transform: rotate(90deg);
}
.gwc-accordion-body {
    padding: 0 16px 16px;
}

/* Checkbox row */
.gwc-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 16px 0;
}
.gwc-checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #046937;
    flex-shrink: 0;
}
.gwc-checkbox-row span {
    font-size: 13px;
    color: #6b8c6b;
    line-height: 1.4;
}

/* Buttons */
.gwc-btn-row {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
.gwc-btn-submit {
    flex: 1;
    background: #61b147;
    border: none;
    border-radius: 10px;
    padding: 13px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: background .15s;
    font-family: inherit;
    text-align: center;
}
.gwc-btn-submit:hover { background: #046937; }
.gwc-btn-submit:disabled { background: #a8d08d; cursor: not-allowed; }
.gwc-btn-secondary {
    flex: 1;
    background: #fff;
    border: 2px solid #61b147;
    border-radius: 10px;
    padding: 11px;
    font-size: 14px;
    font-weight: 600;
    color: #046937;
    cursor: pointer;
    transition: background .15s, color .15s;
    font-family: inherit;
    text-align: center;
}
.gwc-btn-secondary:hover {
    background: #eaf7ea;
}
.gwc-thankyou-actions {
    justify-content: center;
}

/* Thank you */
.gwc-thankyou {
    text-align: center;
    padding: 20px 0;
}
.gwc-check {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #f0f8eb;
    border: 3px solid #62b143;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
}
.gwc-thankyou h2 { margin-bottom: 10px; }
.gwc-thankyou p  { font-size: 14px; color: #4a6e4a; }

/* Preloader */
.gwc-preloader {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.82);
    z-index: 2147483647;
}
.gwc-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #d4e8cb;
    border-top-color: #62b143;
    border-radius: 50%;
    animation: gwcSpin 0.8s linear infinite;
}
@keyframes gwcSpin { to { transform: rotate(360deg); } }

/* Validation */
.gwc-required-error {
    border-color: #ee5a52 !important;
    box-shadow: 0 0 0 3px rgba(238,90,82,.12) !important;
}
@keyframes gwcShake {
    0%,100%{transform:translateX(0)}
    25%{transform:translateX(-5px)}
    75%{transform:translateX(5px)}
}
.gwc-shake { animation: gwcShake .3s ease; }

.gwc-form-error {
    color: #ee5a52;
    font-size: 13px;
    margin-top: 8px;
    text-align: center;
}

/* Honeypot hidden */
.gwc-hp {
    display: none !important;
}

/* Responsive */
@media (max-width: 440px) {
    .gwc-two-col { grid-template-columns: 1fr; }
    .gwcs-modal-body { padding: 16px 14px 14px; }
    .gwcs-modal-heading { font-size: 14px; }
}


/* ── Add to existing CSS ── */

/* Step container */
.gwc-step {
    display: none;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
}
.gwc-step.active {
    display: block;
}

/* === TWO-STEP FORM: Layout tweaks === */
/* === FULL WIDTH NEXT BUTTON ON STEP 1 === */
#gwc-step-1 .gwc-btn-row {
    display: block; /* Remove flex so the button can be full width */
    margin-top: 20px;
}
#gwc-step-1 .gwc-btn-next {
    width: 100%;
    display: block;
}

/* === STEPS 2 & 3: SQUARE BACK BUTTON + FLEX NEXT/SUBMIT === */
#gwc-step-2 .gwc-btn-row,
#gwc-step-3 .gwc-btn-row {
    display: flex;
    gap: 10px;
}
#gwc-step-2 .gwc-btn-prev,
#gwc-step-3 .gwc-btn-prev {
    flex: 0 0 auto;
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 8px;
    border: 1.5px solid #62b143;
    background: #fff;
    color: #046937;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}
#gwc-step-2 .gwc-btn-prev:hover,
#gwc-step-3 .gwc-btn-prev:hover {
    border-color: #046937;
    background: #f7fdf4;
}
#gwc-step-2 .gwc-btn-next,
#gwc-step-3 .gwc-btn-submit {
    flex: 1;
    height: 50px;
}

.gwc-step-title {
    font-size: 17px;
    font-weight: 600;
    color: #1a2e1a;
    margin: 0 0 16px;
}

/* Step bar / dots */
.gwc-step-bar {
    padding: 16px 20px 0;
    border-top: 1px solid #eef2ee;
    margin-top: 16px;
}
.gwc-step-dots {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    position: relative;
}
.gwc-step-dots::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: #d4e8cb;
    z-index: 0;
}
.gwc-dot-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 1;
}
.gwc-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #d4e8cb;
    background: #fff;
    transition: all .25s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    color: #d4e8cb;
}
.gwc-dot.done {
    background: #62b143;
    border-color: #62b143;
    color: #fff;
}
.gwc-dot.active {
    background: #046937;
    border-color: #046937;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(98,177,67,.25);
}
.gwc-dot-label {
    font-size: 9px;
    color: #9ab99a;
    margin-top: 4px;
    font-weight: 500;
    text-align: center;
    letter-spacing: .01em;
    line-height: 1.1;
}
.gwc-dot-wrap.active-wrap .gwc-dot-label {
    color: #046937;
    font-weight: 700;
}
.gwc-dot-wrap.done-wrap .gwc-dot-label {
    color: #62b143;
}

/* Buttons */
.gwc-btn-next {
    flex: 1;
    background: #61b147;
    border: none;
    border-radius: 10px;
    padding: 13px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: background .15s;
    font-family: inherit;
    text-align: center;
}
.gwc-btn-next:hover {
    background: #046937;
}
.gwc-btn-prev {
    flex: 0 0 auto;
    background: #fff;
    border: 1.5px solid #d4e8cb;
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 14px;
    color: #6b8c6b;
    cursor: pointer;
    font-weight: 500;
    transition: all .15s;
    font-family: inherit;
}
.gwc-btn-prev:hover {
    border-color: #62b143;
    color: #046937;
}
.gwc-arrow {
    margin-left: 6px;
}

/* Keep existing styles for fields, upload, etc. */

/* ── Reference badge (thank you) ────────────────────────────── */
.gwc-ref-badge {
    background: #046937;
    border-radius: 10px;
    padding: 16px 20px;
    text-align: center;
    margin: 20px 0 10px;
}
.gwc-ref-badge-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #c9e8c2;
    margin-bottom: 2px;
}
.gwc-ref-badge-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
    margin-bottom: 6px;
}
.gwc-ref-badge-hint {
    display: block;
    font-size: 12px;
    color: #d7ecd0;
}



/* Mobile Styles */

/* Mobile full‑screen override for the complaint modal */
@media (max-width: 480px) {
    /* Remove overlay padding */
    .gwc-overlay {
        padding: 0 !important;
    }

    /* Make the modal card fill the screen */
    .gwcs-modal {
        max-height: 100vh !important;
        height: 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    /* Remove header border-radius */
    .gwcs-modal-header {
        border-radius: 0 !important;
    }

    /* Reduce body padding and allow scrolling */
    .gwcs-modal-body {
        padding: 16px 14px 14px !important;
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Optional: shrink header text and close button */
    .gwcs-modal-heading {
        font-size: 15px !important;
    }
    .gwc-close-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 14px !important;
    }
}
/* Mobile Styles End */

.gwc-accordion-summary {
    font-size: 13px !important;
}
.gwcs-modal-header{
    background: linear-gradient(42deg, #04693738, rgb(71 130 48 / 58%)), url(https://file.greenwoodsdental.com/form-modal-header.jpg) center center / cover no-repeat !important;
}