/* Custom styles for Torah Tech Leining System */

/* Mobile-first responsive enhancements */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Ensure touch targets are at least 44x44px on mobile */
button, .btn, a.btn {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
}

/* Modal styling */
.modal {
    z-index: 9999;
}

.modal.show {
    display: block;
}

/* Aliyah card hover effects */
.aliyah-card {
    transition: all 0.2s ease-in-out;
}

.aliyah-card[data-available="true"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    /* Larger font sizes for better mobile readability */
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    /* Full-width buttons on mobile */
    .mobile-full-width {
        width: 100%;
    }

    /* Stack navigation items on mobile */
    nav .flex {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Adjust modal for mobile */
    .modal > div {
        width: 95%;
        margin: 1rem auto;
        max-height: 90vh;
        overflow-y: auto;
    }
}

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

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

/* Success/error message animations */
.flash-message {
    animation: slideIn 0.3s ease-out;
}

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

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

    .aliyah-card {
        break-inside: avoid;
    }
}

/* Accessible focus styles */
button:focus, input:focus, textarea:focus, select:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Hebrew text support */
.hebrew {
    direction: rtl;
    font-family: 'Times New Roman', serif;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-available {
    background-color: #d1fae5;
    color: #065f46;
}

.status-taken {
    background-color: #f3f4f6;
    color: #4b5563;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}
