/**
 * MUDcal Shared CSS Utilities
 *
 * @package MUDcal
 * @since 2.0.0
 */

/* ==========================================================================
   Modal Common Layout
   ========================================================================== */

/* Shared Overlay Base */
.mudcal-modal-overlay,
#mudcal-activity-modal,
#mudcal-reschedule-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Force Flex Display when opened via JS */
.mudcal-modal-overlay[style*="display: flex"],
.mudcal-modal-overlay[style*="display:flex"],
.mudcal-modal-overlay[style*="display: block"],
.mudcal-modal-overlay[style*="display:block"],
.mudcal-modal-overlay.mudcal-modal-open,
#mudcal-activity-modal[style*="display: flex"],
#mudcal-activity-modal[style*="display:flex"],
#mudcal-activity-modal[style*="display: block"],
#mudcal-activity-modal[style*="display:block"],
#mudcal-reschedule-modal[style*="display: flex"],
#mudcal-reschedule-modal[style*="display:flex"],
#mudcal-reschedule-modal[style*="display: block"],
#mudcal-reschedule-modal[style*="display:block"] {
    display: flex !important;
}

/* Shared Dialog Box */
.mudcal-modal-dialog {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    max-height: 90vh;
    overflow-y: auto;
    width: calc(100% - 40px);
    max-width: 700px;
    position: relative;
    z-index: 1000000;
    margin: 20px auto;
    box-sizing: border-box;
}

.mudcal-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mudcal-modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.mudcal-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.mudcal-modal-close:hover {
    color: #333;
}

.mudcal-modal-body {
    padding: 25px;
}

.mudcal-modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

/* ==========================================================================
   Shared Status Badges
   ========================================================================== */

.mudcal-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mudcal-status-confirmed, 
.mudcal-status-active {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mudcal-status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.mudcal-status-cancelled {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
