/**
 * Arewa Website - Broadcast & Notifications CSS
 * Location: public/assets/css/notifications.css
 */

/* Navigation Pills */
.custom-nav-pill {
    color: var(--text-muted);
    border-radius: 0.5rem;
    padding: 0.5rem 0.85rem;
    font-size: 0.825rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
    text-decoration: none;
}
.custom-nav-pill:hover {
    color: var(--theme-primary, #002fba);
    background-color: var(--theme-primary-soft, #eaf0ff);
}
.custom-nav-pill.active {
    color: #ffffff !important;
    background-color: var(--theme-primary, #002fba) !important;
}

/* Audience Selection Cards */
.recipient-card-option {
    cursor: pointer;
    border: 1.5px solid var(--border-color) !important;
    background: var(--bg-card-subtle, #f8f9fa);
    border-radius: 0.85rem;
    padding: 0.85rem 0.75rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.recipient-card-option:hover {
    border-color: var(--theme-primary, #002fba) !important;
    background: var(--theme-primary-soft, rgba(0, 47, 186, 0.05)) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 47, 186, 0.1);
}
.recipient-card-option.is-active,
.recipient-type-radio:checked + .recipient-card-option {
    border: 2px solid var(--theme-primary, #002fba) !important;
    background: var(--theme-primary-soft, rgba(0, 47, 186, 0.12)) !important;
    box-shadow: 0 0 0 3px rgba(0, 47, 186, 0.15) !important;
    transform: translateY(-1px);
}
.recipient-check-badge {
    display: none;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--theme-primary, #002fba);
    color: #ffffff;
    font-size: 11px;
}
.recipient-card-option.is-active .recipient-check-badge,
.recipient-type-radio:checked + .recipient-card-option .recipient-check-badge {
    display: inline-flex !important;
}

/* Selected Audience Banner */
.audience-selection-indicator {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    background: var(--theme-primary-soft, rgba(0, 47, 186, 0.08));
    border: 1px solid rgba(0, 47, 186, 0.15);
    color: var(--theme-primary, #002fba);
    font-size: 0.785rem;
    font-weight: 600;
}

/* Native Rich Text Editor */
.rich-text-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color) !important;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.rich-text-wrapper:focus-within {
    border-color: var(--theme-primary, #002fba) !important;
    box-shadow: 0 0 0 3px rgba(0, 47, 186, 0.12) !important;
}
.rich-toolbar {
    background: var(--bg-card-subtle, rgba(125, 125, 125, 0.05));
    border-bottom: 1px solid var(--border-color) !important;
    padding: 0.4rem 0.6rem;
    user-select: none;
}
.rich-btn {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
    padding: 0.25rem 0.5rem !important;
    font-size: 0.75rem !important;
    border-radius: 0.375rem !important;
    line-height: 1.2 !important;
    transition: all 0.15s ease !important;
}
.rich-btn:hover {
    background: var(--theme-primary-soft, #eaf0ff) !important;
    color: var(--theme-primary, #002fba) !important;
    border-color: var(--theme-primary, #002fba) !important;
}
.rich-btn.active {
    background: var(--theme-primary, #002fba) !important;
    color: #ffffff !important;
    border-color: var(--theme-primary, #002fba) !important;
}
.rich-editable {
    min-height: 130px;
    max-height: 280px;
    overflow-y: auto;
    outline: none;
    color: var(--text-main);
    font-size: 0.835rem;
    line-height: 1.6;
    padding: 0.75rem 0.85rem;
    background: var(--bg-card);
}
.rich-editable:empty:before {
    content: attr(placeholder);
    color: var(--text-muted);
    opacity: 0.65;
    pointer-events: none;
    display: block;
}

/* Modal Action Buttons (Reduced to 50% / Compact) */
.modal-footer-compact {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 1rem;
    border-top: 1px solid var(--border-color) !important;
    background: transparent;
}
.modal-footer-compact .btn {
    max-width: 50%;
    min-width: 90px;
    padding: 0.4rem 0.9rem !important;
    font-size: 0.775rem !important;
    font-weight: 600;
    border-radius: 0.5rem !important;
}

/* Advert Live Preview Box */
.advert-preview-shell {
    border: 1px dashed var(--border-color);
    background: var(--bg-card-subtle);
    border-radius: 1rem;
    padding: 1rem;
}
.advert-preview-banner-placeholder {
    height: 140px;
    background: linear-gradient(135deg, rgba(0, 47, 186, 0.85) 0%, rgba(59, 130, 246, 0.75) 50%, rgba(16, 185, 129, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 0.75rem;
    overflow: hidden;
    position: relative;
}

/* Standalone Unsubscribe Card */
.unsubscribe-card {
    background-color: var(--card-bg, #1e293b);
    border: 1px solid var(--card-border, #334155);
    border-radius: 1.25rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 100%;
    overflow: hidden;
    text-align: center;
}
.unsubscribe-icon-box,
.icon-box {
    width: 4.75rem;
    height: 4.75rem;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

/* ======================================================== */
/* Dashboard In-App Announcements & Promotional Adverts     */
/* ======================================================== */

/* ======================================================== */
/* Project Theme Pill Announcement Ticker (Dynamic Theme Colors) */
/* ======================================================== */

.announcement-pill-ticker {
    width: 100%;
    margin-bottom: 1.25rem;
}

.announcement-pill-inner {
    background: var(--theme-primary, #002fba);
    background: linear-gradient(90deg, var(--theme-gradient-start, #002696) 0%, var(--theme-primary, #002fba) 45%, var(--theme-gradient-end, #3b82f6) 100%);
    border-radius: 9999px;
    padding: 0.6rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: #ffffff;
    box-shadow: 0 4px 16px var(--theme-shadow, rgba(0, 47, 186, 0.25));
    border: 1px solid rgba(255, 255, 255, 0.18);
    position: relative;
    overflow: hidden;
    min-height: 44px;
}

.announcement-pill-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 0.875rem;
    color: #ffffff;
    flex-shrink: 0;
    user-select: none;
    letter-spacing: -0.01em;
    z-index: 2;
}

.announcement-pill-label i {
    font-size: 1rem;
    color: #ffffff;
    transform: rotate(-10deg);
}

.announcement-ticker-viewport {
    flex: 1;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.announcement-ticker-track {
    display: inline-block;
    white-space: nowrap;
    font-size: 0.855rem;
    font-weight: 550;
    color: #ffffff;
    cursor: default;
    padding-left: 100%;
    will-change: transform;
    animation: announcement-ticker-scroll 16s linear infinite;
}

.announcement-pill-inner:hover .announcement-ticker-track {
    animation-play-state: paused;
}

@keyframes announcement-ticker-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.announcement-ticker-track .ticker-item {
    display: inline-flex;
    align-items: center;
    color: #ffffff;
    font-weight: 550;
}

.announcement-ticker-track .ticker-item a {
    color: #ffffff;
    text-decoration: underline;
    font-weight: 700;
}

.announcement-ticker-track .ticker-bullet {
    display: inline-block;
    margin: 0 1.25rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
}

.announcement-banner-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-color) !important;
}
.announcement-banner-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.announcement-message-content {
    color: var(--text-main);
    line-height: 1.6;
}
.announcement-message-content p:last-child {
    margin-bottom: 0;
}
.announcement-message-content a {
    color: var(--theme-primary, #002fba);
    text-decoration: underline;
    font-weight: 500;
}
.announcement-message-content a:hover {
    color: #2563eb;
}
.announcement-message-content ul,
.announcement-message-content ol {
    margin-bottom: 0.35rem;
    padding-left: 1.25rem;
}

/* Dashboard Advert Cards & Carousels */
.advert-hero-card {
    border: 1px solid var(--border-color) !important;
    transition: all 0.25s ease-in-out;
}
.advert-hero-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}
.advert-image-container {
    position: relative;
    overflow: hidden;
    background: var(--bg-card-subtle, #f1f5f9);
}
.advert-image-container img {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.advert-hero-card:hover .advert-image-container img {
    transform: scale(1.04);
}

/* Abstract Styled Banner Graphic when no custom image uploaded */
.advert-default-graphic {
    min-height: 160px;
    height: 100%;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #06b6d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}
.advert-default-graphic::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}
.advert-default-graphic::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

/* Frosted Glass Carousel Arrows */
.advert-carousel-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.85;
    transition: all 0.2s ease;
}
.advert-carousel-nav-btn:hover {
    background: rgba(0, 47, 186, 0.85);
    color: #ffffff;
    opacity: 1;
    transform: translateY(-50%) scale(1.08);
}
.advert-carousel-indicators button {
    width: 24px;
    height: 4px;
    border-radius: 2px;
    background-color: var(--border-color);
    border: none;
    transition: all 0.25s ease;
}
.advert-carousel-indicators button.active {
    width: 36px;
    background-color: var(--theme-primary, #002fba);
}

/* ======================================================== */
/* Dashboard Promotional Advert Popup Modal (1h Cooldown)   */
/* ======================================================== */

.dashboard-advert-modal-content {
    border-radius: 1.25rem;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    position: relative;
}

.dashboard-advert-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 20;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.dashboard-advert-modal-close:hover {
    opacity: 1;
    transform: scale(1.08);
    background: var(--bg-card-subtle);
}

.dashboard-advert-modal-img-wrap {
    height: 100%;
    min-height: 220px;
    max-height: 340px;
    background: var(--bg-card-subtle, #f8f9fa);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.dashboard-advert-modal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.dashboard-advert-modal-content:hover .dashboard-advert-modal-img {
    transform: scale(1.03);
}

.btn-advert-claim {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
    font-weight: 600;
    transition: all 0.2s ease;
}
.btn-advert-claim:hover {
    background-color: #059669 !important;
    border-color: #059669 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* ======================================================== */
/* Mobile Responsiveness for Notification Hub & Advert Modal */
/* ======================================================== */

@media (max-width: 767.98px) {
    /* Advert Modal on Mobile */
    .dashboard-advert-modal-content {
        border-radius: 1rem;
        margin: 0.25rem;
    }
    .dashboard-advert-modal-close {
        top: 0.65rem;
        right: 0.65rem;
        width: 30px;
        height: 30px;
    }
    .dashboard-advert-modal-img-wrap {
        min-height: 150px;
        max-height: 190px;
    }
    .dashboard-advert-modal-content .p-4 {
        padding: 1.15rem !important;
    }
    .btn-advert-claim {
        width: 100%;
        justify-content: center;
    }
    
    /* Announcement Ticker on Mobile */
    .announcement-pill-inner {
        padding: 0.45rem 0.85rem;
        min-height: 38px;
        gap: 0.5rem;
    }
    .announcement-pill-label {
        font-size: 0.785rem;
    }
    .announcement-ticker-track {
        font-size: 0.785rem;
    }

    /* Admin Notification Hub Table on Mobile */
    .table-responsive table {
        min-width: 680px;
    }

    /* Modal footer on Mobile */
    .modal-footer-compact {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    .modal-footer-compact .btn {
        max-width: 100%;
        flex: 1;
    }

    /* Recipient card options on small devices */
    .recipient-card-option {
        padding: 0.65rem 0.5rem;
    }
    .recipient-card-option .fw-bold {
        font-size: 0.775rem;
    }
}

@media (max-width: 575.98px) {
    .dashboard-advert-modal-img-wrap {
        min-height: 130px;
        max-height: 160px;
    }
}

/* ======================================================== */
/* Modal Dialog Scrollable Support (Forms Inside Modals)    */
/* ======================================================== */
.modal-dialog-scrollable form.modal-content,
.modal-dialog-scrollable .modal-content > form,
.modal-dialog-scrollable .modal-content {
    display: flex !important;
    flex-direction: column !important;
    max-height: calc(100vh - 3.5rem) !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

.modal-dialog-scrollable form.modal-content .modal-body,
.modal-dialog-scrollable .modal-content > form .modal-body,
.modal-dialog-scrollable .modal-content > .modal-body {
    overflow-y: auto !important;
    max-height: calc(85vh - 120px) !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
}

.modal-dialog-scrollable .modal-header,
.modal-dialog-scrollable .modal-footer,
.modal-dialog-scrollable .modal-footer-compact {
    flex-shrink: 0 !important;
}





