/* ============================================
   DETECTOR FIRME INACTIVE — T4.2
   Depends on: style.css (CSS variables)
   ============================================ */

/* ---- Container ---- */
.detector {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 36px 40px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

/* ---- Form row ---- */
.detector__form {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.detector__input {
    flex: 1;
    padding: 14px 18px;
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 500;
    color: var(--dark);
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    min-width: 0; /* prevent overflow in flex */
}

.detector__input::placeholder {
    color: var(--gray-500);
    font-weight: 400;
}

.detector__input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 96, 138, 0.12);
}

.detector__input[aria-invalid="true"] {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(216, 55, 41, 0.1);
}

.detector__submit {
    padding: 14px 28px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    color: var(--white);
    background: var(--blue-deep);
    border: 2px solid var(--blue-deep);
    border-radius: var(--radius);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.detector__submit:hover {
    background: var(--blue-dark);
    border-color: var(--blue-dark);
    transform: translateY(-2px);
}

.detector__submit:active {
    transform: scale(0.97);
}

.detector__note {
    margin-top: 10px;
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.5;
}

/* ---- Loading state ---- */
.detector__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 48px 24px;
    font-size: 16px;
    font-weight: 500;
    color: var(--gray-500);
}

.detector__loading::before {
    content: '';
    width: 22px;
    height: 22px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: detector-spin 0.8s linear infinite;
    flex-shrink: 0;
}

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

/* ---- Result card — base ---- */
.detector__result {
    padding: 28px 32px;
    border-radius: var(--radius);
    border-left: 4px solid transparent;
    margin-bottom: 0;
}

.detector__result h3 {
    font-family: var(--font-display);
    font-size: clamp(18px, 2.2vw, 22px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 12px;
}

.detector__result p {
    font-size: 15px;
    line-height: 1.65;
    margin-bottom: 8px;
}

.detector__result p:last-of-type {
    margin-bottom: 0;
}

/* ---- State: INACTIVE (red) ---- */
.detector__result--inactive {
    background: var(--red-bg);
    border-left-color: var(--red);
}

.detector__result--inactive h3 {
    color: var(--red);
}

/* ---- State: ACTIVE (green) ---- */
.detector__result--active {
    background: var(--green-50);
    border-left-color: var(--green);
}

.detector__result--active h3 {
    color: var(--green-dark);
}

/* ---- State: REACTIVATED (blue) ---- */
.detector__result--reactivated {
    background: #eff6ff;
    border-left-color: #3b82f6;
}

.detector__result--reactivated h3 {
    color: #1d4ed8;
}

/* ---- State: ERROR (yellow) ---- */
.detector__result--error {
    background: #fefce8;
    border-left-color: #eab308;
}

.detector__result--error h3 {
    color: #854d0e;
}

.detector__result--error a {
    color: var(--blue);
    text-decoration: underline;
}

/* ---- CTAs row ---- */
.detector__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    align-items: center;
}

.detector__cta {
    margin-top: 0; /* reset if global btn adds margin */
}

/* Outline-dark variant (used in results) */
.btn--outline-dark {
    background: transparent;
    color: var(--dark);
    border-color: var(--gray-300);
}

.btn--outline-dark:hover {
    border-color: var(--dark);
    background: var(--gray-100);
    transform: translateY(-2px);
}

/* ---- Email upgrade block ---- */
.detector__email-upgrade {
    margin-top: 20px;
    padding: 24px 28px;
    background: var(--gray-100);
    border: 1.5px dashed var(--gray-300);
    border-radius: var(--radius);
}

.detector__email-upgrade h4 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--blue-deep);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.detector__email-upgrade > p {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 14px;
    line-height: 1.5;
}

.detector__email-form {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.detector__email-form input[type="email"] {
    flex: 1;
    padding: 11px 16px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--dark);
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    outline: none;
    min-width: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.detector__email-form input[type="email"]::placeholder {
    color: var(--gray-500);
}

.detector__email-form input[type="email"]:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 96, 138, 0.1);
}

.detector__email-form input[type="email"][aria-invalid="true"] {
    border-color: var(--red);
}

.detector__email-form .btn {
    padding: 11px 22px;
    font-size: 14px;
    flex-shrink: 0;
}

.detector__email-status {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 500;
    min-height: 20px;
    line-height: 1.5;
}

/* Green for success, red for error — use data attribute or class on the element */
.detector__email-status:not(:empty) {
    padding: 6px 0;
}

/* ---- Retry button (in error state) ---- */
#detector-retry {
    /* inherits .btn .btn--outline-dark styles */
}

/* ---- Mobile breakpoint @ 600px ---- */
@media (max-width: 600px) {
    .detector {
        padding: 24px 20px;
    }

    .detector__form {
        flex-direction: column;
        gap: 10px;
    }

    .detector__submit {
        width: 100%;
        justify-content: center;
    }

    .detector__result {
        padding: 22px 20px;
    }

    .detector__ctas {
        flex-direction: column;
        align-items: stretch;
    }

    .detector__cta,
    .detector__ctas .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .detector__email-form {
        flex-direction: column;
        gap: 10px;
    }

    .detector__email-form .btn {
        width: 100%;
        justify-content: center;
    }

    .detector__email-upgrade {
        padding: 18px 16px;
    }
}


/* ---- Inline section on MAIN (T4.6) ---- */
.section--detector-inline {
    padding: 64px 0 56px;
    background: var(--white);
}
.detector-inline__head {
    text-align: center;
    margin-bottom: 28px;
}
.detector-inline__title {
    font-family: var(--font-heading);
    font-size: clamp(26px, 3.4vw, 36px);
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 10px;
    line-height: 1.15;
}
.detector-inline__sub {
    font-size: 17px;
    color: var(--gray-600, #475569);
    margin: 0;
}
@media (max-width: 600px) {
    .section--detector-inline { padding: 44px 0 36px; }
}

