/* Dashboard Calendar Custom Styles - Laravel Red Theme */

/* Override admin calendar header for dashboard */
#dashboard-calendar-widget .admin-calendar-header {
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
    color: white;
    padding: 1rem;
    text-align: center;
    position: relative;
    border-radius: 8px 8px 0 0;
}

/* Dashboard month/year buttons */
#dashboard-calendar-widget .admin-month-button,
#dashboard-calendar-widget .admin-year-button {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

#dashboard-calendar-widget .admin-month-button:hover,
#dashboard-calendar-widget .admin-year-button:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-1px);
}

/* Dashboard navigation buttons */
#dashboard-calendar-widget .admin-calendar-nav {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    width: 36px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 600;
}

#dashboard-calendar-widget .admin-calendar-nav:hover {
    background: rgba(255, 255, 255, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
}

#dashboard-calendar-widget .admin-calendar-nav:active {
    background: rgba(255, 255, 255, 0.6) !important;
    transform: translateY(1px);
}

/* Simplified Next/Previous Button Animations */
.dashboard-calendar .nav-button {
    transform: none; /* Remove any scaling or movement */
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    border-radius: 6px; /* Rounded rectangle for consistency */
}

.dashboard-calendar .nav-button:hover {
    background-color: rgba(0, 0, 0, 0.05); /* Subtle hover effect */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Light shadow */
}

.dashboard-calendar .nav-button:active {
    transform: none; /* Remove downward movement */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); /* Smaller shadow */
}

/* Dashboard dropdowns */
#dashboard-calendar-widget .admin-month-dropdown,
#dashboard-calendar-widget .admin-year-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 4px;
    min-width: 120px;
}

/* Show dropdown with show class */
#dashboard-calendar-widget .admin-month-dropdown.show,
#dashboard-calendar-widget .admin-year-dropdown.show {
    display: block !important;
}

/* Show dropdown when visible (backwards compatibility) */
#dashboard-calendar-widget .admin-month-dropdown[style*="block"],
#dashboard-calendar-widget .admin-year-dropdown[style*="block"] {
    display: block !important;
}

#dashboard-calendar-widget .dropdown-option,
#dashboard-calendar-widget .admin-dropdown-item {
    padding: 10px 12px;
    cursor: pointer;
    color: #374151;
    font-size: 14px;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
}

#dashboard-calendar-widget .dropdown-option:last-child,
#dashboard-calendar-widget .admin-dropdown-item:last-child {
    border-bottom: none;
}

#dashboard-calendar-widget .dropdown-option:hover,
#dashboard-calendar-widget .admin-dropdown-item:hover {
    background-color: #f3f4f6;
    color: #dc2626;
    font-weight: 500;
}

#dashboard-calendar-widget .dropdown-option:first-child,
#dashboard-calendar-widget .admin-dropdown-item:first-child {
    border-radius: 6px 6px 0 0;
}

#dashboard-calendar-widget .dropdown-option:last-child,
#dashboard-calendar-widget .admin-dropdown-item:last-child {
    border-radius: 0 0 6px 6px;
}

/* Month/year selector container */
#dashboard-calendar-widget .admin-month-year-selector {
    display: flex;
    align-items: center;
    gap: 12px;
}

#dashboard-calendar-widget .admin-month-selector,
#dashboard-calendar-widget .admin-year-selector {
    position: relative;
}

/* Dashboard calendar widget container */
#dashboard-calendar-widget {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Dashboard calendar days styling */
#dashboard-calendar-widget .admin-calendar-days {
    background: white;
    padding: 0;
}

#dashboard-calendar-widget .admin-calendar-weekdays {
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
    position: relative;
    overflow: hidden;
}

.dashboard-calendar-day.today::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent);
    pointer-events: none;
}

.dashboard-calendar-day.today:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.5);
}

/* Selected Day */
.dashboard-calendar-day.selected {
    background: #fef2f2 !important;
    color: #991b1b !important;
    border: 2px solid #dc2626;
    border-radius: 8px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.dashboard-calendar-day.selected:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

/* Weekend Days */
.dashboard-calendar-day.weekend {
    color: #dc2626;
    font-weight: 600;
}

/* Make Sunday specifically more prominent */
.dashboard-calendar-day.sunday {
    color: #b91c1c !important; /* Darker red for Sunday */
    font-weight: 700 !important;
    background: #fef2f2; /* Light red background */
}

.dashboard-calendar-day.weekend:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.dashboard-calendar-day.sunday:hover {
    background: #fee2e2; /* Slightly darker red background on hover */
    color: #991b1b;
}

/* Days with Events */
.dashboard-calendar-day.has-event {
    position: relative;
}

/* Ensure default white background for days without specific category */
.dashboard-calendar-day.current-month:not(.has-event) {
    background: white !important;
    color: #374151 !important;
}

/* Category Background Colors for Calendar Days */
.dashboard-calendar-day.has-event.libur-nasional {
    background: #dc2626 !important;
    color: white !important;
}

.dashboard-calendar-day.has-event.libur-univ {
    background: #7c3aed !important;
    color: white !important;
}

.dashboard-calendar-day.has-event.minggu-tenang {
    background: #d97706 !important;
    color: white !important;
}

.dashboard-calendar-day.has-event.administrasi-akademik {
    background: #3b82f6 !important;
    color: white !important;
}

.dashboard-calendar-day.has-event.awal-kuliah {
    background: #eab308 !important;
    color: white !important;
}

.dashboard-calendar-day.has-event.kegiatan-besar {
    background: #059669 !important;
    color: white !important;
}

/* Multiple categories indicator */
.dashboard-calendar-day.has-event.multiple-categories {
    background: linear-gradient(45deg, #dc2626 25%, #3b82f6 25%, #3b82f6 50%, #059669 50%, #059669 75%, #eab308 75%) !important;
    color: white !important;
}

.dashboard-calendar-day.has-event:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Current Date Info */
#dashboard-current-date-info {
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    color: #374151;
    text-align: center;
    font-weight: 500;
}

/* Activity Section */
#dashboard-activity-section {
    background: white;
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
}

#dashboard-activity-section h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
}

#dashboard-activity-content {
    min-height: 60px;
    max-height: 200px;
    overflow-y: auto;
}

/* Activity Category Styles */
.activity-item.libur-nasional {
    background: #fef2f2;
    border-color: #dc2626;
}

.activity-item.libur-nasional .activity-title {
    color: #dc2626;
}

.activity-item.libur-univ {
    background: #faf5ff;
    border-color: #7c3aed;
}

.activity-item.libur-univ .activity-title {
    color: #7c3aed;
}

.activity-item.minggu-tenang {
    background: #fffbeb;
    border-color: #d97706;
}

.activity-item.minggu-tenang .activity-title {
    color: #d97706;
}

.activity-item.administrasi-akademik {
    background: #eff6ff;
    border-color: #3b82f6;
}

.activity-item.administrasi-akademik .activity-title {
    color: #3b82f6;
}

.activity-item.awal-kuliah {
    background: #fefce8;
    border-color: #eab308;
}

.activity-item.awal-kuliah .activity-title {
    color: #eab308;
}

.activity-item.kegiatan-besar {
    background: #ecfdf5;
    border-color: #059669;
}

.activity-item.kegiatan-besar .activity-title {
    color: #059669;
}

/* Dashboard Activity Category Styles */
.dashboard-activity-item.libur-nasional {
    background: #fef2f2;
    border-color: #dc2626;
}

.dashboard-activity-item.libur-nasional .dashboard-activity-title {
    color: #dc2626;
}

.dashboard-activity-item.libur-univ {
    background: #faf5ff;
    border-color: #7c3aed;
}

.dashboard-activity-item.libur-univ .dashboard-activity-title {
    color: #7c3aed;
}

.dashboard-activity-item.minggu-tenang {
    background: #fffbeb;
    border-color: #d97706;
}

.dashboard-activity-item.minggu-tenang .dashboard-activity-title {
    color: #d97706;
}

.dashboard-activity-item.administrasi-akademik {
    background: #eff6ff;
    border-color: #3b82f6;
}

.dashboard-activity-item.administrasi-akademik .dashboard-activity-title {
    color: #3b82f6;
}

.dashboard-activity-item.awal-kuliah {
    background: #fefce8;
    border-color: #eab308;
}

.dashboard-activity-item.awal-kuliah .dashboard-activity-title {
    color: #eab308;
}

.dashboard-activity-item.kegiatan-besar {
    background: #ecfdf5;
    border-color: #059669;
}

.dashboard-activity-item.kegiatan-besar .dashboard-activity-title {
    color: #059669;
}

/* Category Badge Styles */
.activity-category-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 0.5rem;
}

.activity-category-badge.libur-nasional {
    background: #dc2626;
    color: white;
}

.activity-category-badge.libur-univ {
    background: #7c3aed;
    color: white;
}

.activity-category-badge.minggu-tenang {
    background: #d97706;
    color: white;
}

.activity-category-badge.administrasi-akademik {
    background: #3b82f6;
    color: white;
}

.activity-category-badge.awal-kuliah {
    background: #eab308;
    color: white;
}

.activity-category-badge.kegiatan-besar {
    background: #059669;
    color: white;
}

.activity-item {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.activity-item:hover {
    background: #fef1f1;
    border-color: #fca5a5;
    transform: translateX(2px);
}

.activity-item:last-child {
    margin-bottom: 0;
}

.activity-time {
    font-size: 1rem;
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 0.25rem;
}

.activity-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2563eb;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

/* Tablet: slightly larger title */
@media (min-width: 768px) {
    .activity-title {
        font-size: 1.125rem;
        margin-bottom: 0.375rem;
        -webkit-line-clamp: 3;
    }
}

/* Desktop: larger title for better readability */
@media (min-width: 1024px) {
    .activity-title {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }
}

.activity-description {
    font-size: 1rem;
    color: #6b7280;
    line-height: 1.5;
}

/* Desktop: larger text for better readability */
@media (min-width: 768px) {
    .activity-description {
        font-size: 1.125rem;
        line-height: 1.6;
    }
}

/* Large desktop: even larger */
@media (min-width: 1024px) {
    .activity-description {
        font-size: 1.25rem;
        line-height: 1.6;
    }
}

.activity-placeholder {
    text-align: center;
    color: #9ca3af;
    font-size: 1rem;
    font-style: italic;
    padding: 1rem;
}

.activity-empty {
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px dashed #d1d5db;
}

.activity-loading {
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
    padding: 1rem;
}

.activity-loading::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #dc2626;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* Responsive Design */
@media (max-width: 768px) {
    #dashboard-calendar-widget {
        border-radius: 8px;
        margin: 0 1rem;
    }

    .dashboard-calendar-header {
        padding: 0.75rem;
    }

    .dashboard-calendar-header h3 {
        font-size: 1rem;
    }

    .dashboard-calendar-nav {
        width: 28px;
        height: 28px;
    }

    .dashboard-calendar-nav.prev {
        left: 8px;
    }

    .dashboard-calendar-nav.next {
        right: 8px;
    }

    .dashboard-calendar-weekday {
        padding: 0.5rem 0.25rem;
        font-size: 0.875rem;
    }

    .dashboard-calendar-day {
        height: 36px;
        font-size: 1rem;
    }

    .dashboard-calendar-days {
        min-height: 252px;
    }

    #dashboard-current-date-info {
        padding: 0.625rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .dashboard-calendar-weekday {
        font-size: 0.75rem;
        padding: 0.5rem 0.125rem;
    }

    .dashboard-calendar-day {
        height: 32px;
        font-size: 0.875rem;
    }

    .dashboard-calendar-days {
        min-height: 224px;
    }

    .dashboard-calendar-nav {
        width: 24px;
        height: 24px;
        font-size: 1rem;
    }
}

/* Dark Mode Support - Disabled to maintain white theme */
@media (prefers-color-scheme: dark) {
    #dashboard-calendar-widget {
        background: white;
        border-color: #e5e7eb;
    }

    .dashboard-calendar-weekdays {
        background: #f8fafc;
        border-bottom-color: #e5e7eb;
    }

    .dashboard-calendar-weekday {
        color: #6b7280;
    }

    .dashboard-calendar-day.current-month {
        color: #374151;
        background: white;
    }

    .dashboard-calendar-day.current-month:hover {
        background: #f3f4f6;
        color: #374151;
    }

    .dashboard-calendar-day.prev-month,
    .dashboard-calendar-day.next-month {
        color: #d1d5db;
        background: #fafafa;
    }

    .dashboard-calendar-day.weekend {
        color: #f87171;
    }

    .dashboard-calendar-day.weekend:hover {
        background: #f3f4f6;
        color: #f87171;
    }

    #dashboard-current-date-info {
        background: #f8fafc;
        border-top-color: #e5e7eb;
        color: #374151;
    }
}

/* Print Styles */
@media print {
    #dashboard-calendar-widget {
        box-shadow: none;
        border: 2px solid #000;
    }

    .dashboard-calendar-header {
        background: #000 !important;
        color: #fff !important;
    }

    .dashboard-calendar-nav {
        display: none;
    }

    .dashboard-calendar-day.today {
        background: #000 !important;
        color: #fff !important;
    }

    .dashboard-calendar-day.selected {
        background: #f0f0f0 !important;
        color: #000 !important;
        border: 2px solid #000 !important;
    }
}

/* Animation Keyframes */
@keyframes dashboard-calendar-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.dashboard-calendar-day.today:focus {
    animation: dashboard-calendar-pulse 0.6s ease-in-out;
    outline: none;
}

/* Accessibility Improvements */
.dashboard-calendar-nav:focus,
.dashboard-calendar-day:focus {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
    z-index: 10;
}

/* Loading State */
.dashboard-calendar-loading {
    opacity: 0.6;
    pointer-events: none;
}

.dashboard-calendar-loading .dashboard-calendar-days {
    position: relative;
}

.dashboard-calendar-loading .dashboard-calendar-days::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #dc2626;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Dashboard Activity Styles */
.dashboard-activity-item {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.dashboard-activity-item:hover {
    background: #fef2f2;
    border-color: #f87171;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
}

.dashboard-activity-item:last-child {
    margin-bottom: 0;
}

.dashboard-activity-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 0.75rem;
}

.dashboard-activity-type {
    font-size: 0.75rem;
    padding: 4px 12px;
    background: #dc2626;
    color: white;
    border-radius: 12px;
    font-weight: 500;
}

.dashboard-activity-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #991b1b;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.dashboard-activity-description {
    font-size: 1.125rem;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

/* Desktop: larger text for better readability */
@media (min-width: 768px) {
    .dashboard-activity-description {
        font-size: 1.25rem;
        line-height: 1.6;
    }
}

/* Large desktop: even larger */
@media (min-width: 1024px) {
    .dashboard-activity-description {
        font-size: 1.375rem;
        line-height: 1.6;
    }
}

.dashboard-activity-location {
    font-size: 0.875rem;
    color: #059669;
    font-weight: 500;
}

.dashboard-activity-empty {
    text-align: center;
    padding: 1.5rem;
    color: #9ca3af;
    font-size: 0.875rem;
    font-style: italic;
}

.dashboard-activity-loading {
    text-align: center;
    padding: 1rem;
    color: #6b7280;
    font-size: 0.875rem;
}
