/* Custom CSS for Student Feedback System */

/* Font families */
:root {
    --turquoise: #40E0D0;
    --turquoise-dark: #36c9b3;
    --turquoise-light: #7febe3;
    --font-en: 'Inter', sans-serif;
    --font-ar: 'Noto Sans Arabic', sans-serif;
}

/* Global styles */
body {
    font-family: var(--font-en);
    background-color: #f8f9fa;
}

/* Arabic text styling */
[dir="rtl"], [lang="ar"] {
    font-family: var(--font-ar);
    text-align: right;
}

/* Custom turquoise theme */
.bg-turquoise {
    background-color: var(--turquoise) !important;
}

.text-turquoise {
    color: var(--turquoise) !important;
}

.btn-turquoise {
    background-color: var(--turquoise);
    border-color: var(--turquoise);
    color: white;
}

.btn-turquoise:hover {
    background-color: var(--turquoise-dark);
    border-color: var(--turquoise-dark);
    color: white;
}

.btn-outline-turquoise {
    color: var(--turquoise);
    border-color: var(--turquoise);
}

.btn-outline-turquoise:hover {
    background-color: var(--turquoise);
    border-color: var(--turquoise);
    color: white;
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
}

/* Main content */
.main-content {
    min-height: calc(100vh - 200px);
}

/* Card styling */
.card {
    border-radius: 12px;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    border-bottom: 1px solid rgba(0,0,0,0.125);
}

/* Form styling */
.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: var(--turquoise);
    box-shadow: 0 0 0 0.2rem rgba(64, 224, 208, 0.25);
}

.form-control-lg, .form-select-lg {
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
}

/* Sentiment selection */
.sentiment-selection {
    flex-wrap: wrap;
}

.sentiment-btn {
    border-radius: 12px;
    padding: 1rem;
    border: 2px solid #dee2e6;
    background: white;
    transition: all 0.2s ease;
    min-width: 120px;
}

.sentiment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.sentiment-emoji {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.sentiment-label {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Star rating */
.star-rating {
    gap: 0.25rem;
}

.star-input {
    display: none;
}

.star-label {
    cursor: pointer;
    font-size: 2rem;
    color: #ddd;
    transition: color 0.2s ease;
}

.star-label:hover,
.star-input:checked ~ .star-label,
.star-input:checked + .star-label {
    color: #ffc107;
}

/* Hover effect for stars */
.star-rating:hover .star-label {
    color: #ddd;
}

.star-rating .star-label:hover,
.star-rating .star-label:hover ~ .star-label {
    color: #ffc107;
}

/* Character counter */
#charCount {
    font-weight: 500;
}

/* Alert styling */
.alert {
    border-radius: 8px;
    border: none;
}

/* Table styling */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table-hover tbody tr:hover {
    background-color: rgba(64, 224, 208, 0.05);
}

/* Feedback text in table */
.feedback-text {
    word-break: break-word;
    line-height: 1.4;
}

/* Badge styling */
.badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
}

/* Chart containers */
canvas {
    max-height: 300px;
}

/* Accordion styling */
.accordion-button {
    background-color: #f8f9fa;
    border: none;
    color: var(--turquoise);
    font-weight: 500;
}

.accordion-button:not(.collapsed) {
    background-color: var(--turquoise);
    color: white;
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(64, 224, 208, 0.25);
}

/* Pagination */
.page-link {
    color: var(--turquoise);
}

.page-item.active .page-link {
    background-color: var(--turquoise);
    border-color: var(--turquoise);
}

.page-link:hover {
    color: var(--turquoise-dark);
}

/* Responsive design */
@media (max-width: 768px) {
    .sentiment-selection {
        flex-direction: column;
        align-items: center;
    }
    
    .sentiment-btn {
        min-width: 200px;
        margin-bottom: 0.5rem;
    }
    
    .star-rating {
        justify-content: center;
    }
    
    .star-label {
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 576px) {
    .display-5 {
        font-size: 2rem;
    }
    
    .h3 {
        font-size: 1.5rem;
    }
    
    .sentiment-emoji {
        font-size: 1.5rem;
    }
    
    .star-label {
        font-size: 1.2rem;
    }
}

/* RTL support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .navbar-brand {
    margin-right: 0;
    margin-left: auto;
}

[dir="rtl"] .navbar-nav {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .me-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

/* Loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--turquoise-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--turquoise);
}

/* Print styles */
@media print {
    .navbar, .btn, .dropdown, .pagination {
        display: none !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
    
    .bg-turquoise {
        background-color: #666 !important;
    }
}

/* Animation for form submission */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.btn-turquoise:active {
    animation: pulse 0.3s ease;
}

/* Focus states for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--turquoise);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }
    
    .btn-turquoise {
        background-color: #000;
        border-color: #000;
    }
    
    .text-turquoise {
        color: #000 !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
