/**
 * Tool Shared Styles
 *
 * Styles for email gate overlay and teaser widget card.
 * Follows existing CSS conventions from single-post.css.
 * Uses CSS custom properties with fallbacks matching theme pattern.
 *
 * Components:
 *   .onyx-tool-gate    -- Email gate form card
 *   .onyx-tool-teaser  -- Embeddable teaser card
 *
 * @package Onyx
 * @version 1.0.0
 */

/* ==========================================================================
   Email Gate -- Card
   ========================================================================== */

.onyx-tool-gate {
    max-width: 480px;
    margin: 2rem auto;
    padding: 2rem 2.5rem;
    background: var(--onyx-navy, #1F273B);
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.onyx-tool-gate__icon {
    margin-bottom: 1rem;
}
.onyx-tool-gate__icon svg {
    width: 48px;
    height: 48px;
}

.onyx-tool-gate__headline {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.5rem;
}

.onyx-tool-gate__description {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 1.5rem;
}

/* ==========================================================================
   Email Gate -- Form
   ========================================================================== */

.onyx-tool-gate__input-group {
    display: flex;
    gap: 0.75rem;
    max-width: 400px;
    margin: 0 auto 0.75rem;
}

.onyx-tool-gate__input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    background: #fff;
    color: var(--onyx-navy, #1F273B);
}
.onyx-tool-gate__input::placeholder {
    color: #999;
}
.onyx-tool-gate__input:focus {
    outline: 2px solid var(--onyx-gold, #FFBB09);
    outline-offset: 2px;
}

.onyx-tool-gate__submit {
    white-space: nowrap;
    padding: 0.75rem 1.5rem;
}
.onyx-tool-gate__submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.onyx-tool-gate__privacy {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* ==========================================================================
   Email Gate -- Error State
   ========================================================================== */

.onyx-tool-gate__error {
    color: #e74c3c;
    background: rgba(192, 57, 43, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    margin: 0.75rem 0 0;
}

/* ==========================================================================
   Email Gate -- Success State
   ========================================================================== */

.onyx-tool-gate__success {
    padding: 0.5rem 0;
}

.onyx-tool-gate__access-granted {
    color: var(--onyx-gold, #FFBB09);
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}

.onyx-tool-gate__success .onyx-btn {
    font-size: 1.125rem;
    padding: 0.875rem 2rem;
}

/* ==========================================================================
   Email Gate -- Overlay Mode (optional)
   ========================================================================== */

.onyx-tool-gate--overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.onyx-tool-gate--overlay .onyx-tool-gate {
    margin: 0;
    max-width: 480px;
    width: 100%;
}

/* ==========================================================================
   Teaser Widget -- Card
   ========================================================================== */

.onyx-tool-teaser {
    max-width: 500px;
    margin: 2rem 0;
    padding: 2rem 2.5rem;
    background: linear-gradient(135deg, var(--onyx-navy, #1F273B), var(--onyx-mid-navy, #303D5D));
    color: #fff;
    border-radius: 12px;
    border-left: 4px solid var(--onyx-gold, #FFBB09);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.onyx-tool-teaser:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transform: scale(1.01);
}

.onyx-tool-teaser__icon {
    margin-bottom: 1rem;
}
.onyx-tool-teaser__icon svg {
    width: 48px;
    height: 48px;
    color: var(--onyx-gold, #FFBB09);
}

.onyx-tool-teaser__headline {
    font-size: 1.375rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.5rem;
}

.onyx-tool-teaser__description {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 1.5rem;
}

.onyx-tool-teaser__cta {
    display: inline-block;
}

/* ==========================================================================
   Gated Content Visibility
   ========================================================================== */

.onyx-tool-content--gated {
    display: none;
}

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

@media (max-width: 768px) {
    .onyx-tool-gate {
        padding: 1.5rem 1.25rem;
        max-width: 100%;
    }
    .onyx-tool-gate__input-group {
        flex-direction: column;
    }
    .onyx-tool-gate__headline {
        font-size: 1.25rem;
    }

    .onyx-tool-teaser {
        padding: 1.5rem 1.25rem;
        max-width: 100%;
    }
    .onyx-tool-teaser__headline {
        font-size: 1.25rem;
    }
}
