/* ==========================================
   Enquiry popup, enquiry form fields and toast.
   Loaded on every page that includes includes/lead_modal.html, including the
   standalone service pages that don't load fynco-modern.css.
   ========================================== */
.lead-modal-backdrop,
.toast-container,
.strategy-form {
    --fynco-emerald: #0b3e38;
    --fynco-border: #e2e8f0;
    --fynco-shadow-md: 0 10px 40px rgba(0, 0, 0, 0.12);
}

/* Lead Modal Styling */
.lead-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(9, 11, 11, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lead-modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.lead-modal-card {
    background: #fff;
    width: min(580px, 92vw);
    padding: 40px 44px;
    border-radius: 16px;
    box-shadow: var(--fynco-shadow-md);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.lead-modal-backdrop.open .lead-modal-card {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
}

.modal-kicker {
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fynco-emerald);
    font-weight: 700;
}

.modal-header h3 {
    font-size: 26px;
    margin: 6px 0 8px;
    line-height: 1.2;
}

.modal-header p {
    font-size: 14px;
    color: #666;
    margin: 0 0 24px;
}

.lead-form .form-group {
    margin-bottom: 18px;
}

.lead-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.lead-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

.lead-form input,
.lead-form textarea,
.lead-form select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid var(--fynco-border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    background-color: #fff;
    transition: border-color 0.2s;
}

.lead-form textarea {
    resize: none !important;
    overflow-y: auto !important;
}

.lead-form input:focus,
.lead-form textarea:focus,
.lead-form select:focus {
    outline: none;
    border-color: var(--fynco-emerald);
}

.career-cv-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #666;
}

.btn-submit-lead {
    width: 100%;
    height: 50px;
    margin-top: 10px;
    cursor: pointer;
}

/* The enquiry form grew (industry + services), so keep the card inside the viewport. */
.lead-modal-card {
    max-height: 92vh;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Enquiry: Services Required multi-select picker (shared by popup + homepage form) */
.services-picker__trigger {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--fynco-border);
    border-radius: 8px;
    background: #fff;
    font: inherit;
    font-size: 14px;
    color: #333;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s;
}

.services-picker__trigger:focus-visible,
.services-picker.is-open .services-picker__trigger {
    outline: none;
    border-color: var(--fynco-emerald);
}

.services-picker__summary {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.services-picker:not(.has-value) .services-picker__summary {
    color: #888;
}

.services-picker__chevron {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.services-picker.is-open .services-picker__chevron {
    transform: rotate(180deg);
}

.services-picker__panel {
    margin-top: 6px;
    max-height: 280px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--fynco-border);
    border-radius: 8px;
    background: #fff;
}

.services-picker__panel[hidden] {
    display: none;
}

.services-picker__group {
    border: 0;
    margin: 0;
    padding: 0 0 6px;
    min-width: 0;
}

.services-picker__group legend {
    position: sticky;
    top: 0;
    z-index: 1;
    float: left;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 14px 6px;
    background: #f5f7f6;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fynco-emerald);
}

.services-picker__group legend + * {
    clear: both;
}

.lead-form .services-picker__option,
.strategy-form .services-picker__option,
.services-picker__option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 7px 14px;
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
    line-height: 1.4;
    color: #333;
    cursor: pointer;
}

.services-picker__option:hover {
    background: rgba(0, 0, 0, 0.03);
}

.lead-form .services-picker__option input,
.strategy-form .services-picker__option input,
.services-picker__option input {
    width: 16px !important;
    height: 16px;
    flex-shrink: 0;
    margin: 2px 0 0;
    padding: 0 !important;
    accent-color: var(--fynco-emerald);
}

/* Dark homepage form variant */
.strategy-form select {
    width: 100%;
    box-sizing: border-box;
    background: #142032 !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    border-radius: 12px;
    padding: 14px 18px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    color: #ffffff !important;
}

.strategy-form select:focus {
    outline: none;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25) !important;
}

.strategy-form select option {
    background: #0d1624;
    color: #fff;
}

.strategy-form .services-picker__trigger {
    background: #142032;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    padding: 14px 18px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #fff;
}

.strategy-form .services-picker:not(.has-value) .services-picker__summary {
    color: #cbd5e1;
    opacity: 0.75;
}

.strategy-form .services-picker__trigger:focus-visible,
.strategy-form .services-picker.is-open .services-picker__trigger {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

.strategy-form .services-picker__panel {
    background: #142032;
    border-color: rgba(255, 255, 255, 0.22);
    border-radius: 12px;
}

.strategy-form .services-picker__group legend {
    background: #0d1624;
    color: #38bdf8;
}

.strategy-form .services-picker__option {
    color: #e2e8f0 !important;
}

.strategy-form .services-picker__option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.strategy-form .services-picker__option input {
    accent-color: #38bdf8;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1100;
    pointer-events: none;
}

.toast-message {
    background: #090b0b;
    color: #fff;
    padding: 14px 22px;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--fynco-shadow-md);
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.3s ease;
}

.toast-message.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-icon {
    color: #4ade80;
    font-weight: bold;
}

/* Spinner Loader */
.spinner-loader {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

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

@media (max-width: 900px) {
    .lead-form .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .lead-modal-card {
        padding: 28px 20px;
        width: 95vw;
        border-radius: 12px;
    }

    .modal-header h3 {
        font-size: 20px;
    }
}
