﻿.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.custom-modal-content {
    background: #ffffff;
    padding: 24px 26px 22px;
    border-radius: 14px;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
    text-align: left;
    max-width: 420px;
    width: 92%;
    margin: 20px;
    position: relative;
    display: grid;
    grid-template-columns: 44px 1fr;
    column-gap: 14px;
    row-gap: 4px;
    align-items: start;
}

.custom-modal-content > :not(.custom-modal-icon):not(.custom-modal-title):not(.custom-modal-message):not(.custom-modal-close) {
    grid-column: 1 / -1;
}

.custom-modal-icon {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    color: white;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 0 0 4px rgba(37, 96, 166, 0.12);
}

.custom-modal-title {
    grid-column: 2;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    padding-right: 22px;
}

.custom-modal-message {
    grid-column: 2;
    color: #64748b;
    font-size: 13.5px;
    line-height: 1.5;
    white-space: pre-wrap;
    margin: 0;
}

    .custom-modal-message ul,
    .custom-modal-message ol {
        text-align: left;
        padding-left: 30px; /* Adds space for the bullets/numbers */
        margin-top: 10px; /* Adds a bit of space before the list starts */
        margin-bottom: 10px; /* Adds a bit of space after the list ends */
    }

.custom-modal-message-highlight {
    font-weight: bold;
    color: #D32F2F;
}

/* ------------------------------ */

.custom-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    font-weight: bold;
    color: #dc3545;
    cursor: pointer;
    transition: color 0.2s ease-in-out;
}

    .custom-modal-close:hover {
        color: #333;
    }

#tinyModalOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000 !important;
    opacity: 1;
    transition: opacity 0.3s ease;
}

    #tinyModalOverlay.hidden {
        opacity: 0;
        pointer-events: none;
    }

.tiny-modal-box {
    position: relative;
    background-color: white;
    color: #333;
    padding: 1.5rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    max-width: 90%;
    text-align: center;
    font-size: 1rem;
}

.tiny-modal-close {
    position: absolute;
    top: 8px;
    right: 12px;

    font-size: 1.75rem;
    font-weight: bold;
    color: #aaa;
    line-height: 1;

    cursor: pointer;
    transition: color 0.2s ease;
}

    .tiny-modal-close:hover {
        color: #333;
    }

/* --- Optional Color Modes --- */
.modal-box-success {
    background-color: #d4edda;
    color: #155724;
}

.modal-box-warning {
    background-color: #fff3cd;
    color: #856404;
}

.modal-box-error {
    background-color: #f8d7da;
    color: #721c24;
}

.modal-box-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/*---------------*/
.custom-modal-buttons {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.custom-modal-button {
    padding: 8px 18px;
    font-size: 13.5px;
    font-weight: 600;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background-color: #ffffff;
    color: #0f172a;
    cursor: pointer;
    transition: all 0.15s ease;
}

    .custom-modal-button:hover {
        background-color: #f8fafc;
        border-color: #94a3b8;
    }

    /* Style for the "primary" (Proceed) button */
    .custom-modal-button.primary {
        background-color: #dc2626;
        border-color: #dc2626;
        color: white;
    }

        .custom-modal-button.primary:hover {
            filter: brightness(0.92);
        }

/* --- Broadcast Notice Modal --- */
.custom-modal-content.broadcast-modal-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    max-width: 620px;
    width: 94%;
    padding: 0;
    overflow: hidden;
    gap: 0;
}

.broadcast-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 22px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.broadcast-modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.broadcast-modal-badge {
    background: #f9a131;
    color: #0f172a;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 9px;
    border-radius: 999px;
    flex-shrink: 0;
}

.broadcast-modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f2c52;
}

.broadcast-modal-close {
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 0 4px;
}

    .broadcast-modal-close:hover {
        color: #0f172a;
    }

.broadcast-modal-body {
    padding: 20px 22px;
    font-size: 14px;
    line-height: 1.65;
    color: #334155;
    max-height: 60vh;
    overflow-y: auto;
    word-break: break-word;
}

.broadcast-modal-footer {
    padding: 12px 22px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
}

.broadcast-modal-dismiss {
    background: #2560a6;
    border-color: #2560a6;
    color: #ffffff;
}

    .broadcast-modal-dismiss:hover {
        background: #184275;
        border-color: #184275;
    }