/* ============================= */
/* Global styles */
/* ============================= */
body {
    background-color: #f8f9fa;
    direction: rtl;
    font-family: Arial, sans-serif;
}

/* Cards */
.card {
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* ============================= */
/* FullCalendar styling */
/* ============================= */
.fc-timegrid-slot {
    height: 65px !important;
}

.fc-timegrid-event {
    min-height: 55px !important;
}

.fc-event {
    padding: 6px;
    border-radius: 8px;
    white-space: normal !important;
}

.fc-event-title {
    font-size: 13px;
    font-weight: bold;
    line-height: 1.3;
    white-space: normal !important;
    display: block;
}

.fc-timegrid-slot-label {
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
}

/* ============================= */
/* Floating alerts and bubbles */
/* ============================= */
.floating-alert,
.limit-bubble,
.event-bubble {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
    z-index: 9999;
    text-align: center;
    max-width: 90%;
    word-wrap: break-word;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    animation: fadeInOut 4s forwards;
}

/* Floating alert specific color */
.floating-alert {
    background: #dc3545;
}

/* Event bubble color can be customized inline with JS */

/* ============================= */
/* Animations */
/* ============================= */
@keyframes fadeInOut {
    0%   { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    10%  { opacity: 1; transform: translateX(-50%) translateY(0); }
    90%  { opacity: 1; }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* ============================= */
/* Mobile portrait adjustments */
/* ============================= */
@media (max-width: 768px) and (orientation: portrait) {

    /* FullCalendar toolbar adjustments */
    .fc-header-toolbar {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
    }

    .fc-toolbar-chunk {
        display: flex;
        align-items: center;
        gap: 4px;
        white-space: nowrap;
    }

    .fc-toolbar-title {
        font-size: 16px !important;
        margin: 0 !important;
        white-space: nowrap;
    }

    .fc-button {
        padding: 4px 8px !important;
        font-size: 13px !important;
    }

    .fc-timegrid-slot-label {
        min-width: 70px;
        font-size: 14px;
    }

    /* Hide event text for vertical mobile */
    .fc-event-title {
        display: none !important;
    }

    /* Floating alerts on mobile smaller */
    .floating-alert,
    .limit-bubble,
    .event-bubble {
        font-size: 13px;
        padding: 8px 12px;
        top: 15px;
    }
}

/* ============================= */
/* Table styling */
.table th, .table td {
    vertical-align: middle;
    text-align: center;
}

/* Optional: responsive tables */
.table-responsive {
    overflow-x: auto;
}
