/* Custom modern styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
}

/* Prevent scroll chaining across columns */
.overscroll-contain {
    overscroll-behavior: contain;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
.no-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Custom scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Pulse animation for overdue tasks */
@keyframes pulse-subtle {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        opacity: 0.92;
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
}

.overdue-pulse {
    animation: pulse-subtle 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

/* Dimmed card style for submitted tasks */
.task-submitted-card {
    opacity: 0.78;
    transition: all 0.2s ease-in-out;
}
.task-submitted-card:hover {
    opacity: 1;
}

/* Modal animation */
.modal-enter {
    animation: modalFadeIn 0.2s ease-out forwards;
}
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Sidebars: luôn hiển thị rõ ràng, không làm mờ */
.sidebar-dimmable {
    opacity: 1 !important;
}

/* Vertical text for collapsed sidebar expanders */
.vertical-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* ======================================================== */
/* GOOGLE CALENDAR-STYLE 7-DAY WEEKLY GRID STYLES */
/* ======================================================== */
.cal-hour-row {
    height: 60px;
    border-bottom: 1px solid #f1f5f9;
    box-sizing: border-box;
    position: relative;
}
.cal-half-hour-line {
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    border-bottom: 1px dashed #f8fafc;
    pointer-events: none;
}
.cal-day-col {
    position: relative;
    border-right: 1px solid #cbd5e1;
    height: 1440px; /* 24 hours * 60px */
    box-sizing: border-box;
    transition: background-color 0.15s ease;
}
.cal-day-col:last-child {
    border-right: none;
}

/* Phần lịch thời gian đã trôi qua tô xám tối màu hơn */
.cal-past-day {
    background-color: #cbd5e1 !important; /* Xám đậm rõ rệt */
    opacity: 0.85;
}
.cal-today-past-shading {
    background-color: rgba(71, 85, 105, 0.28) !important; /* Xám tối màu hơn cho khoảng thời gian đã qua trong ngày */
}

/* Highlight cột khi kéo thả sự kiện sang ngày khác */
.cal-day-col.cal-drag-target {
    background-color: #dbeafe !important;
    box-shadow: inset 0 0 0 2.5px #2563eb !important;
}
.cal-current-time-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #ef4444;
    z-index: 25;
    pointer-events: none;
}
.cal-current-time-dot {
    position: absolute;
    left: -5px;
    top: -4px;
    width: 10px;
    height: 10px;
    border-radius: 9999px;
    background-color: #ef4444;
    box-shadow: 0 0 0 2px white;
}
.cal-event-card {
    position: absolute;
    left: 3px;
    right: 3px;
    border-radius: 8px;
    padding: 3px 6px;
    font-size: 11px;
    line-height: 1.25;
    overflow: hidden;
    cursor: grab;
    z-index: 15;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    transition: transform 0.05s ease, box-shadow 0.15s ease;
}
.cal-event-card:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
    z-index: 20;
}
.cal-event-card.is-dragging {
    cursor: grabbing !important;
    opacity: 0.88;
    box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.3);
    z-index: 40 !important;
}
.cal-resize-handle {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 7px;
    cursor: ns-resize;
    z-index: 22;
}
.cal-resize-handle:hover {
    background-color: rgba(255, 255, 255, 0.35);
}
.cal-floating-tooltip {
    position: absolute;
    background-color: #1e293b;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    z-index: 50;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}
