/* ==========================================
   Band Competition Notifications — Modal
   ========================================== */

/* Overlay — darkened background behind the modal */
#bcn-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bcnFadeIn 0.3s ease forwards;
}

/* Modal Box */
#bcn-modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 520px;
    margin: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    animation: bcnSlideUp 0.35s ease forwards;
    display: flex;
    flex-direction: column;
}

/* Header */
#bcn-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    background: #1e3a5f;
    color: #fff;
}

#bcn-modal-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

#bcn-modal-icon {
    font-size: 1.5rem;
    line-height: 1;
}

#bcn-modal-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    border: none;
    padding: 0;
}

#bcn-modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

#bcn-modal-close:hover {
    color: #fff;
}

/* Header color changes based on notification type */
#bcn-modal.bcn-type--info    #bcn-modal-header { background: #1e40af; }
#bcn-modal.bcn-type--success #bcn-modal-header { background: #166534; }
#bcn-modal.bcn-type--warning #bcn-modal-header { background: #92400e; }
#bcn-modal.bcn-type--error   #bcn-modal-header { background: #991b1b; }

/* Body */
#bcn-modal-body {
    padding: 24px 26px;
    min-height: 140px;
}

/* Individual slides */
.bcn-slide {
    animation: bcnFadeIn 0.25s ease forwards;
}

.bcn-slide--info    { border-left: 4px solid #3b82f6; padding-left: 16px; }
.bcn-slide--success { border-left: 4px solid #22c55e; padding-left: 16px; }
.bcn-slide--warning { border-left: 4px solid #f59e0b; padding-left: 16px; }
.bcn-slide--error   { border-left: 4px solid #ef4444; padding-left: 16px; }

.bcn-slide__message {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    margin: 0 0 16px;
}

.bcn-slide__deadline {
    display: inline-block;
    font-size: 0.9rem;
    color: #555;
    background: #f3f4f6;
    padding: 6px 14px;
    border-radius: 20px;
}

.bcn-slide__deadline.bcn-deadline--urgent {
    background: #fef2f2;
    color: #991b1b;
    animation: bcnPulse 1.8s ease-in-out infinite;
}

/* Footer */
#bcn-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    flex-wrap: wrap;
    gap: 10px;
}

/* Navigation buttons */
#bcn-modal-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

#bcn-btn-prev,
#bcn-btn-next {
    background: #e5e7eb;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    transition: background 0.2s;
}

#bcn-btn-prev:hover:not(:disabled),
#bcn-btn-next:hover:not(:disabled) {
    background: #d1d5db;
}

#bcn-btn-prev:disabled,
#bcn-btn-next:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

#bcn-modal-counter {
    font-size: 0.85rem;
    color: #6b7280;
    white-space: nowrap;
}

/* Action buttons */
#bcn-modal-actions {
    display: flex;
    gap: 8px;
}

#bcn-btn-dismiss {
    background: none;
    border: 1px solid #d1d5db;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.82rem;
    color: #6b7280;
    transition: all 0.2s;
}

#bcn-btn-dismiss:hover {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

#bcn-btn-close {
    background: #1e3a5f;
    border: none;
    padding: 6px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    transition: background 0.2s;
}

#bcn-btn-close:hover {
    background: #2271b1;
}

/* Progress bar */
#bcn-progress-bar {
    height: 4px;
    background: #e5e7eb;
}

#bcn-progress-fill {
    height: 100%;
    background: #2271b1;
    transition: width 0.3s ease;
}

/* Animations */
@keyframes bcnFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes bcnSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0);    }
}

@keyframes bcnPulse {
    0%, 100% { box-shadow: none; }
    50%       { box-shadow: 0 0 10px rgba(239, 68, 68, 0.4); }
}

/* Responsive */
@media ( max-width: 540px ) {
    #bcn-modal-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    #bcn-modal-actions {
        width: 100%;
        justify-content: flex-end;
    }
}