/* ==========================================
   SiteRooster Contact Modal
   Prefix: src- (SiteRooster Contact)
   Global modal — fires from nav or any page
   ========================================== */

/* ==========================================
   Overlay
   ========================================== */
.src-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.src-overlay.src-visible {
    display: flex;
    opacity: 1;
}

/* ==========================================
   Modal Card
   ========================================== */
.src-modal {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.18),
        0 4px 16px rgba(0, 0, 0, 0.06);
    transform: translateY(14px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    position: relative;
}

.src-overlay.src-visible .src-modal {
    transform: translateY(0) scale(1);
}

/* ==========================================
   Close Button
   ========================================== */
.src-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(0, 0, 0, 0.04);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.15s ease;
    z-index: 2;
    padding: 0;
}

.src-close:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: scale(1.05);
}

.src-close svg {
    width: 16px;
    height: 16px;
    stroke: #6b7280;
    stroke-width: 2;
}

/* ==========================================
   Header
   ========================================== */
.src-header {
    padding: 36px 32px 20px;
    text-align: center;
}

.src-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    margin: 0 auto 16px;
}

.src-header-icon svg {
    width: 28px;
    height: 28px;
    stroke: #0ea5e9;
    fill: none;
    stroke-width: 1.8;
}

.src-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #022c22;
    margin: 0 0 6px 0;
    letter-spacing: -0.3px;
}

.src-header p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* ==========================================
   Form
   ========================================== */
.src-form {
    padding: 8px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.src-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.src-field label {
    font-size: 13px;
    font-weight: 600;
    color: #022c22;
    letter-spacing: 0.01em;
}

.src-field label .src-optional {
    font-weight: 400;
    color: #9ca3af;
    font-size: 12px;
    margin-left: 4px;
}

.src-field input[type="text"],
.src-field input[type="email"],
.src-field input[type="url"],
.src-field select,
.src-field textarea {
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    color: #022c22;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.src-field input:focus,
.src-field select:focus,
.src-field textarea:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    background: #fff;
}

.src-field input::placeholder,
.src-field textarea::placeholder {
    color: #9ca3af;
}

.src-field textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.6;
}

.src-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' fill='none' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

/* ==========================================
   Row (two fields side-by-side)
   ========================================== */
.src-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ==========================================
   Turnstile Container
   ========================================== */
.src-turnstile {
    display: flex;
    justify-content: center;
    min-height: 65px;
}

.src-turnstile iframe {
    border-radius: 8px !important;
}

/* ==========================================
   Submit Button
   ========================================== */
.src-submit {
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    color: #fff;
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    position: relative;
}

.src-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.3);
}

.src-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.src-submit svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    transition: transform 0.2s ease;
}

.src-submit:hover:not(:disabled) svg {
    transform: translateX(2px);
}

/* Loading spinner */
.src-submit .src-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: src-spin 0.6s linear infinite;
}

.src-submit.src-loading .src-btn-text { display: none; }
.src-submit.src-loading .src-btn-icon { display: none; }
.src-submit.src-loading .src-spinner { display: block; }

@keyframes src-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   Error & Success Messages
   ========================================== */
.src-error {
    display: none;
    font-size: 13px;
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 14px;
    line-height: 1.5;
}

.src-success {
    display: none;
    text-align: center;
    padding: 48px 32px;
}

.src-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.src-success-icon svg {
    width: 32px;
    height: 32px;
    stroke: #0ea5e9;
    fill: none;
    stroke-width: 2.5;
}

.src-success h3 {
    font-size: 20px;
    font-weight: 700;
    color: #022c22;
    margin: 0 0 8px 0;
}

.src-success p {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 24px 0;
    line-height: 1.6;
}

.src-success-close {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    color: #0ea5e9;
    background: #f0f9ff;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.src-success-close:hover {
    background: #e0f2fe;
    color: #0284c7;
}

/* ==========================================
   Footer Trust Line
   ========================================== */
.src-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 32px 24px;
    font-size: 12px;
    color: #9ca3af;
}

.src-footer svg {
    width: 13px;
    height: 13px;
    stroke: #9ca3af;
    fill: none;
    stroke-width: 2;
    flex-shrink: 0;
}

/* ==========================================
   Nav Contact Icon Button
   Inside sr-nav-inner flex container, pushed
   to the far right via margin-left: auto.
   ========================================== */
.sr-nav-contact-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
    padding: 0 !important;
    margin-left: auto !important;
    position: relative !important;
    flex-shrink: 0 !important;
}

.sr-nav-contact-btn:hover {
    background: #f3f4f6 !important;
}

.sr-nav-contact-btn svg {
    width: 20px !important;
    height: 20px !important;
    stroke: #4b5563 !important;
    fill: none !important;
    stroke-width: 1.8 !important;
    transition: stroke 0.2s ease !important;
}

.sr-nav-contact-btn:hover svg {
    stroke: #0ea5e9 !important;
}

/* Tooltip */
.sr-nav-contact-btn::after {
    content: 'Contact us';
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    background: #1f2937;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.sr-nav-contact-btn:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==========================================
   Responsive
   ========================================== */

/* Hide desktop contact icon on mobile — mobile menu has its own Contact Us */
@media (max-width: 900px) {
    .sr-nav-contact-btn {
        display: none !important;
    }
}

@media (max-width: 600px) {
    .src-modal {
        max-width: 100%;
        border-radius: 16px;
    }

    .src-header {
        padding: 28px 20px 16px;
    }

    .src-form {
        padding: 8px 20px 24px;
        gap: 14px;
    }

    .src-row {
        grid-template-columns: 1fr;
    }

    .src-footer {
        padding: 0 20px 20px;
    }

    .src-header h2 {
        font-size: 20px;
    }
}