/* School Support System - Custom Styles */

/* Base styles */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Loading animation */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

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

/* Custom card styles */
.card {
    @apply bg-white rounded-lg shadow-md border border-gray-200 transition-shadow duration-200;
}

.card:hover {
    @apply shadow-lg;
}

.card-header {
    @apply px-6 py-4 border-b border-gray-200 bg-gray-50 rounded-t-lg;
}

.card-body {
    @apply px-6 py-4;
}

.card-footer {
    @apply px-6 py-4 border-t border-gray-200 bg-gray-50 rounded-b-lg;
}

/* Schedule table styles */
.schedule-table {
    @apply w-full border-collapse;
}

.schedule-table th,
.schedule-table td {
    @apply border border-gray-300 p-3 text-center;
}

.schedule-table th {
    @apply bg-school-primary text-white font-semibold;
}

.schedule-table td {
    @apply bg-white;
}

.schedule-table tbody tr:hover {
    @apply bg-gray-50;
}

/* Assignment status styles */
.status-pending {
    @apply bg-yellow-100 text-yellow-800 px-2 py-1 rounded-full text-xs font-medium;
}

.status-completed {
    @apply bg-green-100 text-green-800 px-2 py-1 rounded-full text-xs font-medium;
}

.status-late {
    @apply bg-red-100 text-red-800 px-2 py-1 rounded-full text-xs font-medium;
}

/* Priority styles */
.priority-high {
    @apply border-l-4 border-red-500;
}

.priority-medium {
    @apply border-l-4 border-yellow-500;
}

.priority-low {
    @apply border-l-4 border-green-500;
}

/* Week type badges */
.week-badge {
    @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
}

.week-a {
    @apply bg-blue-100 text-blue-800;
}

.week-b {
    @apply bg-green-100 text-green-800;
}

.week-c {
    @apply bg-orange-100 text-orange-800;
}

.week-d {
    @apply bg-purple-100 text-purple-800;
}

/* Subject color coding */
.subject-math {
    @apply bg-blue-50 border-l-4 border-blue-400;
}

.subject-science {
    @apply bg-green-50 border-l-4 border-green-400;
}

.subject-japanese {
    @apply bg-red-50 border-l-4 border-red-400;
}

.subject-english {
    @apply bg-yellow-50 border-l-4 border-yellow-400;
}

.subject-social {
    @apply bg-purple-50 border-l-4 border-purple-400;
}

.subject-other {
    @apply bg-gray-50 border-l-4 border-gray-400;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .card {
        @apply mx-2;
    }

    .schedule-table {
        @apply text-sm;
    }

    .schedule-table th,
    .schedule-table td {
        @apply p-2;
    }
}

/* Animation utilities */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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

/* Notification styles */
.notification {
    @apply fixed top-4 right-4 max-w-sm bg-white border border-gray-200 rounded-lg shadow-lg p-4 z-50;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.notification-success {
    @apply border-green-400 bg-green-50;
}

.notification-error {
    @apply border-red-400 bg-red-50;
}

.notification-warning {
    @apply border-yellow-400 bg-yellow-50;
}

.notification-info {
    @apply border-blue-400 bg-blue-50;
}

/* Form styles */
.form-group {
    @apply mb-4;
}

.form-label {
    @apply block text-sm font-medium text-gray-700 mb-2;
}

.form-input {
    @apply w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-school-primary focus:border-transparent;
}

.form-select {
    @apply w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-school-primary focus:border-transparent bg-white;
}

.form-textarea {
    @apply w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-school-primary focus:border-transparent resize-vertical;
}

/* Button styles */
.btn {
    @apply inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 transition-colors duration-200;
}

.btn-primary {
    @apply text-white bg-school-primary hover:bg-blue-700 focus:ring-school-primary;
}

.btn-secondary {
    @apply text-gray-700 bg-white hover:bg-gray-50 border-gray-300 focus:ring-gray-500;
}

.btn-success {
    @apply text-white bg-school-accent hover:bg-green-600 focus:ring-school-accent;
}

.btn-warning {
    @apply text-white bg-school-warning hover:bg-yellow-600 focus:ring-school-warning;
}

.btn-danger {
    @apply text-white bg-school-danger hover:bg-red-600 focus:ring-school-danger;
}

.btn-sm {
    @apply px-3 py-1 text-xs;
}

.btn-lg {
    @apply px-6 py-3 text-base;
}

/* Modal styles */
.modal {
    @apply fixed inset-0 z-50 overflow-y-auto;
}

.modal-backdrop {
    @apply fixed inset-0 bg-black bg-opacity-50 transition-opacity;
}

.modal-container {
    @apply flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0;
}

.modal-content {
    @apply inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full;
}

.modal-header {
    @apply px-6 py-4 border-b border-gray-200 bg-gray-50;
}

.modal-body {
    @apply px-6 py-4;
}

.modal-footer {
    @apply px-6 py-4 border-t border-gray-200 bg-gray-50 text-right;
}

/* Tab styles */
.tabs {
    @apply border-b border-gray-200;
}

.tab-list {
    @apply flex space-x-8;
}

.tab {
    @apply py-2 px-1 border-b-2 border-transparent font-medium text-sm text-gray-500 hover:text-gray-700 hover:border-gray-300 transition-colors duration-200 cursor-pointer;
}

.tab.active {
    @apply border-school-primary text-school-primary;
}

.tab-content {
    @apply mt-4;
}

/* Sidebar styles */
.sidebar {
    @apply fixed inset-y-0 left-0 w-64 bg-white shadow-lg transform -translate-x-full transition-transform duration-300 ease-in-out z-40;
}

.sidebar.open {
    @apply translate-x-0;
}

.sidebar-header {
    @apply p-4 border-b border-gray-200;
}

.sidebar-menu {
    @apply py-4;
}

.sidebar-menu-item {
    @apply block px-4 py-2 text-gray-700 hover:bg-gray-100 transition-colors duration-200;
}

.sidebar-menu-item.active {
    @apply bg-school-primary text-white;
}

/* Dashboard grid */
.dashboard-grid {
    @apply grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6;
}

.dashboard-card {
    @apply bg-white p-6 rounded-lg shadow-md border border-gray-200;
}

.dashboard-card-icon {
    @apply w-8 h-8 text-school-primary;
}

.dashboard-card-title {
    @apply text-lg font-semibold text-gray-900 mt-2;
}

.dashboard-card-content {
    @apply mt-2 text-gray-600;
}

/* Utility classes */
.text-truncate {
    @apply truncate;
}

.text-wrap {
    word-wrap: break-word;
}

.full-height {
    min-height: 100vh;
}

.center {
    @apply flex items-center justify-center;
}

.sticky-top {
    @apply sticky top-0 z-30;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    .card {
        @apply border border-gray-300 shadow-none;
    }

    .btn {
        @apply border border-gray-300 text-black bg-white;
    }
}
