/* Common Styles for Our Classroom Tools */
/* Using Tailwind CSS + Custom Components */

/* Custom color palette as CSS variables */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-darker: #1e40af;
    --secondary: #667eea;
    --secondary-dark: #764ba2;
    --dark: #1e293b;
    --darker: #0f172a;
    --light: #f8fafc;
    --gray-light: #cbd5e1;
    --gray: #64748b;
    
    /* Activity colors for calendar */
    --travel: #90be6d;
    --medical: #f94144;
    --holiday: #f9c74f;
    --party: #f3722c;
    --event: #577590;
}

/* Base reset - complement Tailwind */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Navigation Bar Custom Styles */
.nav-gradient {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-darker) 100%);
}

.back-button {
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(-3px);
}

/* Header gradient for homepage */
.header-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

/* Tool card hover effects */
.tool-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* Tool icon gradient */
.tool-icon-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

/* Tool launch button */
.tool-launch-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.tool-launch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Footer gradient */
.footer-gradient {
    background: linear-gradient(135deg, var(--dark) 0%, var(--darker) 100%);
}

/* Social links hover */
.social-link {
    background: #334155;
    transition: background 0.3s ease;
}

.social-link:hover {
    background: var(--primary);
}

/* Worksheet/Tool page gradient backgrounds */
.worksheet-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Tags */
.tag {
    background: #dbeafe;
    color: #1e40af;
}

/* Add tool button */
.add-tool-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    transition: transform 0.3s ease;
}

.add-tool-btn:hover {
    transform: scale(1.1);
}

/* Form elements */
.form-input {
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Worksheet specific styles */
.worksheet-preview {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.worksheet-header-border {
    border-bottom: 3px solid #333;
}

.question-item {
    border-left: 4px solid var(--secondary);
}

.answer-space {
    border: 1px dashed #ccc;
}

.lined-paper {
    background-image: repeating-linear-gradient(
        transparent,
        transparent 29px,
        #ccc 29px,
        #ccc 30px
    );
    background-size: 100% 30px;
}

/* Calendar specific styles */
.calendar-container {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.calendar-header-bg {
    background-color: var(--primary);
}

.calendar-day {
    aspect-ratio: 1;
    min-height: 50px;
}

.calendar-day:hover {
    background-color: #f0f4f8;
}

.calendar-day.today {
    box-shadow: inset 0 0 0 2px var(--primary);
}

.calendar-day.non-month-day {
    color: #ccc;
    background-color: #f9f9f9;
}

/* Activity colors for calendar */
.activity-travel { background-color: var(--travel); }
.activity-medical { background-color: var(--medical); }
.activity-holiday { background-color: var(--holiday); }
.activity-party { background-color: var(--party); }
.activity-event { background-color: var(--event); }

.activity-option {
    transition: all 0.3s ease;
}

.activity-option.selected {
    border-color: var(--primary);
    background-color: rgba(67, 97, 238, 0.1);
}

.calendar-title-input {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    width: 100%;
    outline: none;
    cursor: pointer;
}

.calendar-title-input:focus {
    border-bottom: 2px solid white;
}

.day-edit-input {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    font-size: 0.75rem;
    outline: none;
    resize: none;
}

/* Print styles */
@media print {
    nav, footer, .no-print, .controls, .print-controls {
        display: none !important;
    }
    
    body {
        background: white !important;
        padding: 0 !important;
    }

    .main-content {
        background: white !important;
        padding: 0 !important;
    }
    
    @page {
        margin: 1cm;
    }

    /* Calendar print */
    .calendars-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 0.5rem;
        margin: 0;
        padding: 0;
        page-break-inside: avoid;
    }

    .calendar-container {
        box-shadow: none;
        border-radius: 0;
        margin-bottom: 0;
        page-break-inside: avoid;
        font-size: 0.9em;
    }

    .calendar-day {
        min-height: 30px;
    }

    /* Worksheet print */
    .worksheet-preview {
        box-shadow: none;
        padding: 20px;
        max-width: none;
    }
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}
