/* === Breach Checker Widget === */
.breach-checker {
    --bc-primary: #00BCD4;
    --bc-bg: #ffffff;
    --bc-text: #1a1a2e;
    --bc-btn-text: #ffffff;
    --bc-title-color: #1a1a2e;
    --bc-radius: 12px;
    max-width: 560px;
    margin: 0 auto;
    padding: 28px 24px;
    border-radius: var(--bc-radius) !important;
    background: var(--bc-bg) !important;
    color: var(--bc-text) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    box-sizing: border-box;
}

.breach-checker *,
.breach-checker *::before,
.breach-checker *::after {
    box-sizing: border-box;
}

/* Title — !important to override .elementor-kit-N h3 */
.breach-checker__title {
    margin: 0 0 18px !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: var(--bc-title-color) !important;
    text-align: center;
    line-height: normal !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    word-spacing: normal !important;
}

/* Form */
.breach-checker__form {
    display: flex;
    gap: 10px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

/* Input — !important to override .elementor-kit-N input:not(...) */
.breach-checker__input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px !important;
    font-size: 0.95rem !important;
    border: 1.5px solid #d0d5dd !important;
    border-radius: 6px !important;
    outline: none;
    transition: border-color 0.2s;
    background: rgba(0, 0, 0, 0.03) !important;
    color: var(--bc-text) !important;
    font-family: inherit !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    line-height: normal !important;
}

.breach-checker__input:focus {
    border-color: var(--bc-primary) !important;
    background: var(--bc-bg) !important;
}

.breach-checker__input::placeholder {
    color: #999;
}

/* Button — !important to override .elementor-kit-N button (gradient, padding, typography) */
.breach-checker__btn {
    padding: 12px 22px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: var(--bc-btn-text) !important;
    background: var(--bc-primary) !important;
    background-image: none !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    white-space: nowrap;
    font-family: inherit !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-decoration: none !important;
    font-style: normal !important;
}

.breach-checker__btn:hover,
.breach-checker__btn:focus {
    opacity: 0.88;
    background: var(--bc-primary) !important;
    background-image: none !important;
    color: var(--bc-btn-text) !important;
}

.breach-checker__btn:active {
    transform: scale(0.97);
}

.breach-checker__btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Turnstile widget — collapses when invisible, expands when CF needs interaction */
.breach-checker__turnstile {
    flex-basis: 100%;
    display: flex;
    justify-content: center;
    margin-top: 0;
    transition: margin-top 0.2s;
}

.breach-checker__turnstile:has(iframe) {
    margin-top: 8px;
}

.breach-checker__turnstile .cf-turnstile {
    max-width: 100%;
}

.breach-checker__turnstile .cf-turnstile iframe {
    max-width: 100% !important;
}

/* Highlight turnstile when user needs to act */
.breach-checker__turnstile.is-needed {
    margin-top: 10px;
    padding: 8px;
    background: #fffde7;
    border: 1px solid #fff176;
    border-radius: 6px;
}

/* Results container */
.breach-checker__results {
    margin-top: 8px;
}

/* Messages */
.breach-checker__msg {
    padding: 14px;
    margin-top: 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
}

.breach-checker__msg--error {
    background: #fff0f0;
    color: #c0392b;
    border: 1px solid #f5c6cb;
}

.breach-checker__msg--safe {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
    font-weight: 600;
}

.breach-checker__safe-icon {
    display: inline-block;
    margin-right: 6px;
    font-size: 1.1em;
}

/* Breach summary */
.breach-checker__summary {
    margin-top: 16px;
    padding: 14px 16px;
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
}

.breach-checker__summary-icon {
    display: inline-block;
    margin-right: 6px;
    font-size: 1.1em;
}

/* Breach cards */
.breach-checker__breach-card {
    margin-top: 12px;
    padding: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--bc-radius);
    background: rgba(0, 0, 0, 0.02);
    transition: box-shadow 0.2s;
}

.breach-checker__breach-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.breach-checker__breach-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.breach-checker__breach-logo {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: contain;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.breach-checker__breach-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--bc-text);
}

.breach-checker__breach-domain {
    font-size: 0.8rem;
    opacity: 0.6;
}

.breach-checker__breach-meta {
    display: flex;
    gap: 16px;
    font-size: 0.82rem;
    opacity: 0.7;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.breach-checker__breach-desc {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 8px;
    opacity: 0.85;
}

.breach-checker__breach-classes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.breach-checker__tag {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    color: var(--bc-text);
    opacity: 0.8;
}

/* === Paste summary === */
.breach-checker__paste-summary {
    margin-top: 16px;
    padding: 14px 16px;
    background: #ede7f6;
    color: #4a148c;
    border: 1px solid #b39ddb;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
}

/* Paste cards */
.breach-checker__paste-card {
    margin-top: 12px;
    padding: 16px;
    border: 1px solid rgba(106, 27, 154, 0.15);
    border-radius: var(--bc-radius);
    background: rgba(106, 27, 154, 0.03);
    transition: box-shadow 0.2s;
}

.breach-checker__paste-card:hover {
    box-shadow: 0 2px 12px rgba(106, 27, 154, 0.1);
}

.breach-checker__paste-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.breach-checker__paste-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

.breach-checker__paste-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--bc-text);
}

.breach-checker__paste-source {
    font-size: 0.8rem;
    opacity: 0.6;
}

/* === Consent / Notice === */
.breach-checker__consent {
    flex-basis: 100%;
    margin-top: 10px;
    font-size: 0.78rem;
    opacity: 0.75;
}

.breach-checker__consent label {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    cursor: pointer;
    line-height: 1.4;
}

.breach-checker__consent-check {
    margin-top: 2px !important;
    flex-shrink: 0;
}

.breach-checker__consent-notice {
    flex-basis: 100%;
    margin-top: 8px;
    font-size: 0.72rem;
    opacity: 0.5;
    text-align: center;
    line-height: 1.4;
}

/* === Password check section === */
.breach-checker__password-section {
    margin-top: 0;
}

.breach-checker__password-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 20px 0 16px;
}

.breach-checker__password-label {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: var(--bc-text) !important;
    text-align: center;
    margin: 0 0 12px !important;
    line-height: normal !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}

.breach-checker__password-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.breach-checker__password-privacy {
    font-size: 0.72rem;
    color: var(--bc-text);
    opacity: 0.5;
    text-align: center;
    margin: 8px 0 0;
    line-height: 1.4;
}

.breach-checker__password-results {
    margin-top: 4px;
}

.breach-checker__password-exposed {
    background: #fce4ec !important;
    color: #b71c1c !important;
    border: 1px solid #ef9a9a !important;
    font-weight: 600 !important;
}

.breach-checker__password-safe {
    background: #e8f5e9 !important;
    color: #2e7d32 !important;
    border: 1px solid #a5d6a7 !important;
    font-weight: 600 !important;
}

/* === Sales Pitch section === */
.breach-checker__pitch {
    margin-top: 16px;
    padding: 18px 16px;
    background: linear-gradient(135deg, rgba(0, 188, 212, 0.06) 0%, rgba(0, 188, 212, 0.02) 100%);
    border: 1px solid var(--bc-primary);
    border-radius: var(--bc-radius);
    text-align: center;
}

.breach-checker__pitch-heading {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--bc-text);
    margin-bottom: 8px;
}

.breach-checker__pitch-text {
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--bc-text);
    opacity: 0.85;
    margin-bottom: 12px;
}

.breach-checker__pitch-contact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 18px;
    font-size: 0.82rem;
    margin-bottom: 12px;
    opacity: 0.7;
}

.breach-checker__pitch-contact a {
    color: var(--bc-primary);
    text-decoration: none;
}

.breach-checker__pitch-contact a:hover {
    text-decoration: underline;
}

.breach-checker__pitch-company {
    font-weight: 600;
}

.breach-checker__pitch-cta {
    display: inline-block;
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bc-btn-text) !important;
    background: var(--bc-primary) !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    transition: opacity 0.2s, transform 0.1s;
}

.breach-checker__pitch-cta:hover {
    opacity: 0.88;
    color: var(--bc-btn-text) !important;
    text-decoration: none !important;
}

.breach-checker__pitch-cta:active {
    transform: scale(0.97);
}

/* Spinner */
.breach-checker__spinner {
    display: flex;
    justify-content: center;
    padding: 24px 0;
}

.breach-checker__spinner::after {
    content: '';
    width: 28px;
    height: 28px;
    border: 3px solid #e0e0e0;
    border-top-color: var(--bc-primary);
    border-radius: 50%;
    animation: bc-spin 0.7s linear infinite;
}

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

/* === Popup overlay === */
.breach-checker-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.breach-checker-overlay .breach-checker {
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: bc-fade-in 0.25s ease;
}

/* Close button — !important to avoid inheriting Elementor button gradient/padding */
.breach-checker-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none !important;
    background-image: none !important;
    border: none !important;
    font-size: 1.6rem;
    color: #888 !important;
    cursor: pointer;
    line-height: 1;
    padding: 4px !important;
    z-index: 1;
}

.breach-checker-close:hover,
.breach-checker-close:focus {
    color: #333 !important;
    background: none !important;
    background-image: none !important;
}

@keyframes bc-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* === Popup trigger button (shortcode modo="popup") === */
.breach-checker-popup-trigger {
    padding: 10px 20px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #fff !important;
    background: var(--bc-primary, #00BCD4) !important;
    background-image: none !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: opacity 0.2s;
    font-family: inherit !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-decoration: none !important;
}

.breach-checker-popup-trigger:hover,
.breach-checker-popup-trigger:focus {
    opacity: 0.88;
    background: var(--bc-primary, #00BCD4) !important;
    background-image: none !important;
    color: #fff !important;
}

/* === Floating Action Button — !important to override Elementor button globals === */
.breach-checker-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999998;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px !important;
    background: var(--bc-primary, #00BCD4) !important;
    background-image: none !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50px !important;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-decoration: none !important;
}

.breach-checker-fab:hover,
.breach-checker-fab:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    background: var(--bc-primary, #00BCD4) !important;
    background-image: none !important;
    color: #fff !important;
}

.breach-checker-fab:active {
    transform: scale(0.96);
}

.breach-checker-fab--left {
    right: auto;
    left: 24px;
}

.breach-checker-fab svg {
    flex-shrink: 0;
}

/* === Responsive === */
@media (max-width: 480px) {
    .breach-checker {
        padding: 20px 16px;
        max-width: 100%;
    }

    .breach-checker__form,
    .breach-checker__password-form {
        flex-direction: column;
    }

    .breach-checker__btn {
        width: 100%;
    }

    .breach-checker__breach-header {
        gap: 10px;
    }

    .breach-checker__breach-meta {
        flex-direction: column;
        gap: 4px;
    }

    .breach-checker__pitch-contact {
        flex-direction: column;
        gap: 6px;
    }

    .breach-checker-fab {
        bottom: 16px;
        right: 16px;
        padding: 12px 16px;
        font-size: 0.85rem;
    }

    .breach-checker-fab--left {
        right: auto;
        left: 16px;
    }

    .breach-checker-fab__text {
        display: none;
    }

    .breach-checker-fab {
        border-radius: 50%;
        padding: 14px;
    }
}
