/* ==========================================================================
   WP FALC — Front-end Styles
   ========================================================================== */

/* Button base styles */
.wpfalc-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    transition: all 0.2s ease;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    min-height: 44px;
    min-width: 44px;
}

.wpfalc-button:focus-visible {
    outline: 3px solid #005fcc;
    outline-offset: 2px;
}

.wpfalc-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.wpfalc-button:active {
    transform: translateY(0);
}

/* Logo in button */
.wpfalc-button-logo {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Loading state */
.wpfalc-button.wpfalc-loading {
    opacity: 0.7;
    pointer-events: none;
}

.wpfalc-button.wpfalc-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: wpfalc-spin 0.6s linear infinite;
    margin-left: 4px;
}

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

/* Active state */
.wpfalc-button.wpfalc-button-active {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), inset 0 0 0 2px currentColor;
}

/* ==========================================================================
   Floating positions
   ========================================================================== */

.wpfalc-button-floating {
    position: fixed;
}

.wpfalc-position-top-left     { top: 20px; left: 20px; }
.wpfalc-position-top-center   { top: 20px; left: 50%; transform: translateX(-50%); }
.wpfalc-position-top-center:hover { transform: translateX(-50%) translateY(-1px); }
.wpfalc-position-top-right    { top: 20px; right: 20px; }

.wpfalc-position-middle-left  { top: 50%; left: 20px; transform: translateY(-50%); }
.wpfalc-position-middle-left:hover { transform: translateY(-50%) translateX(-1px); }
.wpfalc-position-middle-right { top: 50%; right: 20px; transform: translateY(-50%); }
.wpfalc-position-middle-right:hover { transform: translateY(-50%) translateX(1px); }

.wpfalc-position-bottom-left   { bottom: 20px; left: 20px; }
.wpfalc-position-bottom-center { bottom: 20px; left: 50%; transform: translateX(-50%); }
.wpfalc-position-bottom-center:hover { transform: translateX(-50%) translateY(-1px); }
.wpfalc-position-bottom-right  { bottom: 20px; right: 20px; }

/* Inline positions */
.wpfalc-button-inline {
    position: relative;
    margin: 16px 0;
}

/* ==========================================================================
   FALC Content Container — the replacement view
   ========================================================================== */

#wpfalc-falc-container {
    display: none;
}

.wpfalc-falc-wrapper {
    max-width: 780px;
    margin: 0 auto;
    padding: 32px 20px 48px;
}

/* Header / Banner */
.wpfalc-falc-header {
    margin-bottom: 32px;
    text-align: center;
}

.wpfalc-falc-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #3F51B5 0%, #5C6BC0 100%);
    color: #fff;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(63, 81, 181, 0.3);
    letter-spacing: 0.01em;
}

.wpfalc-falc-icon {
    flex-shrink: 0;
}

.wpfalc-falc-logo {
    height: 28px;
    border-radius: 4px;
    flex-shrink: 0;
}

.wpfalc-falc-subtitle {
    margin: 12px 0 0;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

/* Body — the actual FALC text */
.wpfalc-falc-body {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);
    padding: 36px 40px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1d2327;
}

.wpfalc-falc-body p {
    font-size: 1.15rem;
    line-height: 1.9;
    margin: 0 0 1em;
    color: #333;
}

.wpfalc-falc-body h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 1.5em 0 0.6em;
    color: #1d2327;
    padding-bottom: 10px;
    border-bottom: 3px solid #3F51B5;
}

.wpfalc-falc-body h1:first-child,
.wpfalc-falc-body h2:first-child {
    margin-top: 0;
}

.wpfalc-falc-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 1.8em 0 0.6em;
    color: #1d2327;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8eaf6;
}

.wpfalc-falc-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.4em 0 0.5em;
    color: #3F51B5;
}

.wpfalc-falc-body h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.2em 0 0.4em;
    color: #555;
}

.wpfalc-falc-body ul,
.wpfalc-falc-body ol {
    padding-left: 1.4em;
    margin: 0 0 1.2em;
}

.wpfalc-falc-body li {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 0.5em;
    color: #333;
}

.wpfalc-falc-body li::marker {
    color: #3F51B5;
}

.wpfalc-falc-body strong {
    font-weight: 700;
    color: #1d2327;
}

.wpfalc-falc-body a {
    color: #3F51B5;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.wpfalc-falc-body a:hover,
.wpfalc-falc-body a:focus {
    color: #1a237e;
    text-decoration-thickness: 2px;
}

/* FALC images — kept per official guidelines, styled simply */
.wpfalc-falc-body img,
.wpfalc-falc-body img.wpfalc-img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.2em auto;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* But hide decorative/non-content media */
.wpfalc-falc-body video,
.wpfalc-falc-body iframe,
.wpfalc-falc-body svg,
.wpfalc-falc-body canvas,
.wpfalc-falc-body figure {
    display: none !important;
}

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

@media (max-width: 768px) {
    .wpfalc-button-floating {
        bottom: 16px !important;
        right: 16px !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
    }

    .wpfalc-button-floating:hover {
        transform: none !important;
    }

    .wpfalc-falc-wrapper {
        padding: 20px 12px 32px;
    }

    .wpfalc-falc-body {
        padding: 24px 20px;
        border-radius: 8px;
    }

    .wpfalc-falc-body p,
    .wpfalc-falc-body li {
        font-size: 1.05rem;
    }

    .wpfalc-falc-badge {
        font-size: 0.85rem;
        padding: 8px 16px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .wpfalc-button,
    .wpfalc-transitioning {
        transition: none;
    }

    .wpfalc-button:hover {
        transform: none;
    }

    .wpfalc-button.wpfalc-loading::after {
        animation: none;
    }
}
