/* Custom Styles for EduAdmin Pro Dashboard */

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Navigation Items */
.nav-item {
    color: #64748b;
    font-size: 0.875rem;
}

.nav-item:hover {
    background-color: #f8fafc;
    color: #0A2342;
}

.nav-item.active {
    background-color: #0A2342;
    color: white;
}

.nav-item.active i {
    color: white;
}

/* Mobile Navigation */
.mobile-nav-item {
    color: #94a3b8;
    transition: all 0.2s;
}

.mobile-nav-item.active {
    color: #0A2342;
}

/* Card Hover Effects */
.stat-card {
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Table Row Hover */
.table-row:hover {
    background-color: #f8fafc;
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-secondary {
    background-color: #f1f5f9;
    color: #475569;
}

.badge-brand {
    background-color: #0A2342;
    color: white;
}

/* Toast Animation */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast-enter {
    animation: slideIn 0.3s ease-out;
}

.toast-exit {
    animation: slideOut 0.3s ease-in;
}

/* Modal Animation */
@keyframes modalIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

#modalContent {
    animation: modalIn 0.2s ease-out;
}

/* Chart Container */
.chart-container {
    position: relative;
    width: 100%;
    height: 250px;
    min-height: 250px;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Progress Bar */
.progress-bar {
    transition: width 0.5s ease;
}

/* Drag and Drop */
.draggable-item {
    cursor: grab;
    transition: all 0.2s;
}

.draggable-item:active {
    cursor: grabbing;
    opacity: 0.7;
}

.draggable-item.dragging {
    opacity: 0.5;
    background-color: #e2e8f0;
}

/* Loading Skeleton */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 2000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 0.5rem;
}

/* Responsive Table */
@media (max-width: 768px) {
    .chart-container {
        height: 220px;
        min-height: 220px;
    }

    .responsive-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Sidebar Toggle Animation */
#sidebar.open {
    transform: translateX(0);
}

/* Custom Checkbox */
.custom-checkbox {
    appearance: none;
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid #cbd5e1;
    border-radius: 0.25rem;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
}

.custom-checkbox:checked {
    background-color: #0A2342;
    border-color: #0A2342;
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
}

/* Pulse Animation for Live Status */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

/* Dropdown Animation */
.dropdown-menu {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.2s ease;
}

.dropdown-menu.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Course Card Hover */
.course-card {
    transition: all 0.3s ease;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(10, 35, 66, 0.15);
}

/* Empty State */
.empty-state {
    padding: 4rem 2rem;
    text-align: center;
}

/* Page Transition */
.page-content {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chat Styles */
.chat-container {
    height: calc(100vh - 340px);
    min-height: 620px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
}

.chat-bubble-sent {
    background-color: #0A2342;
    color: white;
    border-radius: 1rem 1rem 0.25rem 1rem;
}

.chat-bubble-received {
    background-color: #f1f5f9;
    color: #1e293b;
    border-radius: 1rem 1rem 1rem 0.25rem;
}

/* Breadcrumb */
.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    display: inline-block;
    padding: 0 0.5rem;
    color: #94a3b8;
}

/* Mobile Bottom Nav Safe Area */
@media (max-width: 1023px) {
    .chat-container {
        height: auto;
        min-height: 0;
    }

    main {
        padding-bottom: 5rem !important;
    }
}

/* Print Styles */
@media print {
    #sidebar,
    header,
    .mobile-nav-item,
    #toastContainer {
        display: none !important;
    }
    
    .lg\:ml-72 {
        margin-left: 0 !important;
    }
}
