/* ==========================================
   Contact Form Modal
   Shared across vendors.html, patients.html, doctors.html
   ========================================== */

.contact-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(3, 16, 11, 0.78);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 18px 48px;
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all 0.28s ease;
}

.contact-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.contact-modal-shell {
    width: min(900px, 100%);
    max-height: none;
    overflow: hidden;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    position: relative;
    margin: auto 0;
}

.contact-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: #007676;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    z-index: 3;
    transition: transform 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-modal-close:hover {
    transform: scale(1.05);
    background: #005555;
}

.contact-modal-left {
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, #007676 0%, #004f4f 100%);
    color: #ffffff;
    padding: 54px 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-modal-left > * {
    position: relative;
    z-index: 2;
}

.contact-modal-bg-shape {
    position: absolute;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size: contain;
    z-index: 1;
}

.contact-modal-bg-triangle {
    top: 24px;
    right: 2px;
    width: 180px;
    height: 180px;
    background-image: url('../images/bg-triangle.png');
    opacity: 1;
}

.contact-modal-bg-circle {
    bottom: 22px;
    left: -40px;
    width: 220px;
    height: 220px;
    background-image: url('../images/bg-circle.png');
    opacity: 0.22;
}

.contact-modal-logo {
    width: 200px;
    max-width: 75%;
    height: auto;
    margin-bottom: 18px;
    display: block;
}

.contact-modal-brand {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    opacity: 0.7;
    margin-bottom: 10px;
}

.contact-modal-heading {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 14px;
    color: #ffffff;
}

.contact-modal-copy {
    font-size: 14px;
    opacity: 0.85;
    line-height: 1.65;
    margin-bottom: 32px;
    color: #ffffff;
}

.contact-modal-points {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-point {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.contact-point-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    color: #ffffff;
}

.contact-point strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
    color: #ffffff;
}

.contact-point p {
    margin: 0;
    font-size: 13px;
    opacity: 0.8;
    color: #ffffff;
}

/* Right panel */
.contact-modal-right {
    padding: 42px 36px 34px;
    overflow-y: visible;
    overflow-x: visible;
    background: linear-gradient(180deg, #ffffff 0%, #f7faf8 100%);
    min-width: 0;
}

.contact-step-caption {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: #007676;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.contact-step-title {
    margin: 0 0 26px;
    font-size: 28px;
    line-height: 1.2;
    color: #007676;
    font-weight: 700;
}

.contact-field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    min-width: 0;
}

.contact-field {
    margin-bottom: 18px;
    min-width: 0;
}

.contact-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #007676;
    margin-bottom: 8px;
}

.contact-label-optional {
    font-weight: 400;
    opacity: 0.6;
}

.contact-field input,
.contact-field textarea {
    width: 100%;
    max-width: 100%;
    border: 1px solid #d7e4dc;
    border-radius: 16px;
    background: #ffffff;
    padding: 14px 16px;
    font-size: 15px;
    color: #000000;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    font-family: inherit;
    min-width: 0;
    box-sizing: border-box;
}

.contact-field input:focus,
.contact-field textarea:focus {
    border-color: #007676;
    box-shadow: 0 0 0 4px rgba(0, 118, 118, 0.12);
}

.contact-field textarea {
    resize: vertical;
    min-height: 130px;
}

.contact-error {
    display: block;
    min-height: 18px;
    margin-top: 7px;
    font-size: 12px;
    color: #d64545;
}

.contact-form-message {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 14px;
    display: none;
}

.contact-form-message.show {
    display: block;
}

.contact-form-message.error {
    background: rgba(214, 69, 69, 0.08);
    color: #b43131;
    border: 1px solid rgba(214, 69, 69, 0.16);
}

.contact-form-actions {
    margin-top: 28px;
}

.contact-btn-primary {
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 14px 22px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #007676 0%, #004f4f 100%);
    color: #ffffff;
    box-shadow: 0 14px 26px rgba(0, 118, 118, 0.18);
    transition: all 0.22s ease;
    font-family: inherit;
}

.contact-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(0, 118, 118, 0.24);
}

.contact-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

body.contact-modal-open {
    overflow: hidden;
}

/* Success toast */
.contact-success-toast {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(3, 16, 11, 0.38);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.contact-success-toast.active {
    opacity: 1;
    visibility: visible;
}

.contact-success-toast-card {
    width: min(520px, 100%);
    background: #ffffff;
    border-radius: 24px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(0, 118, 118, 0.15);
}

.contact-success-toast-card i {
    font-size: 42px;
    color: #007676;
    margin-bottom: 14px;
    display: block;
}

.contact-success-toast-card p {
    margin: 0;
    font-size: 18px;
    line-height: 1.6;
    color: #007676;
    font-weight: 600;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

/* Small desktop: tighten padding so form doesn't feel cramped */
@media (max-width: 1199.98px) {
    .contact-modal-overlay {
        padding: 20px 16px 40px;
    }
    .contact-modal-left {
        padding: 42px 28px;
    }
    .contact-modal-right {
        padding: 36px 28px 28px;
    }
}

/* Tablet: collapse to single column */
@media (max-width: 991.98px) {
    .contact-modal-overlay {
        padding: 20px 14px 40px;
    }
    .contact-modal-shell {
        grid-template-columns: 1fr;
        width: 100%;
    }
    .contact-modal-left {
        padding: 32px 22px 20px;
    }
    .contact-modal-right {
        padding: 28px 20px 24px;
    }
    .contact-field-grid {
        grid-template-columns: 1fr;
    }
    .contact-modal-heading {
        font-size: 26px;
    }
    .contact-step-title {
        font-size: 23px;
    }
}

/* Large phone */
@media (max-width: 767.98px) {
    .contact-modal-left {
        padding: 28px 20px 20px;
    }
    .contact-modal-right {
        padding: 26px 18px 22px;
    }
    .contact-modal-heading {
        font-size: 24px;
    }
    .contact-step-title {
        font-size: 22px;
    }
    .contact-modal-points {
        display: none;
    }
}

/* Small phone */
@media (max-width: 480px) {
    .contact-modal-overlay {
        padding: 12px 10px 36px;
    }
    .contact-modal-shell {
        border-radius: 18px;
    }
    .contact-modal-left {
        padding: 24px 16px 16px;
    }
    .contact-modal-right {
        padding: 20px 14px 20px;
    }
    .contact-btn-primary {
        width: 100%;
    }
}
