/**
 * Public facing assets for Business Closed WP Plugin
 */

/* ==========================================
 * 1. Announcement Bar Layout
 * ========================================== */
#fdb-announcement-bar-container {
    --fdb-bar-bg: #1e293b;
    --fdb-bar-text: #ffffff;
    --fdb-bar-accent: #38bdf8;
    
    background-color: var(--fdb-bar-bg);
    color: var(--fdb-bar-text);
    padding: 10px 48px 10px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    z-index: 999999;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#fdb-announcement-bar-container.fdb-bar-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

/* Offset body when fixed bar is active */
body.fdb-has-fixed-bar {
    margin-top: 40px !important;
}

#fdb-announcement-bar-container.fdb-bar-inline {
    position: relative;
    border-radius: 6px;
    margin-bottom: 20px;
}

.fdb-bar-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    max-width: 1200px;
    width: 100%;
}

.fdb-bar-icon {
    display: inline-flex;
    align-items: center;
    color: var(--fdb-bar-icon, var(--fdb-bar-accent));
    flex-shrink: 0;
}

.fdb-bar-icon svg {
    width: 20px;
    height: 20px;
}

.fdb-bar-text {
    font-weight: 500;
    line-height: 1.4;
}

.fdb-bar-text strong {
    color: var(--fdb-bar-accent);
    font-weight: 600;
}

/* Close button */
.fdb-bar-close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--fdb-bar-text);
    opacity: 0.7;
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.fdb-bar-close svg {
    width: 18px;
    height: 18px;
}

.fdb-bar-close:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

/* Mobile optimizations: lock bar to a single clean line */
@media (max-width: 768px) {
    #fdb-announcement-bar-container {
        padding: 8px 36px 8px 12px;
        font-size: 12px !important;
    }
    
    .fdb-bar-content {
        justify-content: flex-start;
        gap: 6px;
    }
    
    .fdb-bar-icon {
        font-size: 14px;
    }
    
    .fdb-bar-text {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: left;
        flex-grow: 1;
        display: block;
    }
    
    .fdb-bar-close {
        right: 8px;
        font-size: 16px;
    }
    
    body.fdb-has-fixed-bar {
        margin-top: 34px !important;
    }
}

/* ==========================================
 * 2. Homepage Banner Layout
 * ========================================== */
.fdb-public-banner {
    --fdb-bg: #ffffff;
    --fdb-text: #1e293b;
    --fdb-accent: #0ea5e9;
    
    background-color: var(--fdb-bg);
    color: var(--fdb-text);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    margin: 24px 0;
    position: relative;
    overflow: hidden;
}

.fdb-banner-badge {
    position: absolute;
    top: 24px;
    right: 32px;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.fdb-banner-badge svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.fdb-banner-main {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.fdb-banner-icon-box {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.fdb-banner-icon-box svg {
    width: 32px;
    height: 32px;
}

.fdb-banner-content {
    flex-grow: 1;
}

.fdb-banner-content h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
    font-family: inherit;
    color: var(--fdb-text);
    line-height: 1.2;
}

.fdb-banner-desc {
    margin: 0 0 20px 0;
    font-size: 15px;
    line-height: 1.6;
    opacity: 0.85;
}

.fdb-banner-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 13px;
    font-weight: 500;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-top: 16px;
}

.fdb-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    opacity: 0.8;
}

.fdb-meta-item svg {
    width: 16px;
    height: 16px;
    color: var(--fdb-icon, var(--fdb-accent));
}

.fdb-meta-item.reopen-tag {
    color: var(--fdb-text);
    opacity: 1;
}

.fdb-meta-item.reopen-tag strong {
    color: var(--fdb-accent);
    font-weight: 700;
}

/* Responsiveness for homepage banner */
@media (max-width: 768px) {
    .fdb-public-banner {
        padding: 24px;
    }
    
    .fdb-banner-badge {
        position: static;
        margin-bottom: 20px;
        display: inline-flex;
    }
    
    .fdb-banner-main {
        flex-direction: column;
        gap: 16px;
    }
    
    .fdb-banner-icon-box {
        width: 48px;
        height: 48px;
        font-size: 24px;
        border-radius: 8px;
    }
    
    .fdb-banner-content h3 {
        font-size: 20px;
    }
    
    .fdb-banner-meta {
        flex-direction: column;
        gap: 10px;
        padding-top: 12px;
    }
}

/* Warning and notice boxes for time constraints */
.fdb-time-warning,
.fdb-time-notice {
    box-sizing: border-box;
    animation: fdbFadeIn 0.2s ease-out;
    border-left-width: 4px !important;
}

.fdb-time-warning {
    background-color: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    border-left-color: #ef4444 !important;
    color: #991b1b !important;
}

.fdb-time-notice {
    background-color: #fffbeb !important;
    border: 1px solid #fef3c7 !important;
    border-left-color: #f59e0b !important;
    color: #92400e !important;
}

@keyframes fdbFadeIn {
    from { opacity: 0; transform: translateY(-3px); }
    to { opacity: 1; transform: translateY(0); }
}
