/* Custom styles for SENAI Teacher Evaluation System */

/* Signature box styling */
.signature-box {
    border: 2px dashed var(--bs-border-color);
    border-radius: 8px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--bs-light);
    transition: all 0.3s ease;
    color: #000000 !important;
}

.signature-box * {
    color: #000000 !important;
}

.signature-box:hover {
    border-color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

/* Statistics cards */
.stat-card {
    padding: 1rem;
    border-radius: 8px;
    background-color: rgba(var(--bs-secondary-rgb), 0.1);
    margin-bottom: 0.5rem;
}

.stat-card h3 {
    margin-bottom: 0.25rem;
    font-weight: 700;
}

/* Evaluation criteria table enhancements */
.table-bordered th,
.table-bordered td {
    border-width: 1px;
    vertical-align: middle;
}

.table-bordered thead th {
    background-color: var(--bs-dark);
    color: var(--bs-light);
    font-weight: 600;
    text-align: center;
}

/* Radio button styling in tables */
.table input[type="radio"] {
    transform: scale(1.2);
    margin: 0;
}

/* Row highlighting for evaluation criteria */
.table-success {
    --bs-table-bg: rgba(25, 135, 84, 0.1);
    border-color: rgba(25, 135, 84, 0.2);
}

.table-danger {
    --bs-table-bg: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.2);
}

.table-warning {
    --bs-table-bg: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.2);
}

/* Progress bars customization */
.progress {
    height: 8px;
    border-radius: 4px;
}

.progress-bar {
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* Card enhancements */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    border-bottom: 1px solid rgba(var(--bs-primary-rgb), 0.2);
}

/* Badge enhancements */
.badge {
    font-size: 0.8em;
    font-weight: 500;
}

/* Button group spacing */
.btn-group-sm .btn {
    margin: 0 1px;
}

/* Form enhancements */
.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Modal enhancements */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid rgba(var(--bs-border-color-rgb), 0.5);
    border-radius: 12px 12px 0 0;
}

.modal-footer {
    border-top: 1px solid rgba(var(--bs-border-color-rgb), 0.5);
    border-radius: 0 0 12px 12px;
}

/* Navigation enhancements */
.navbar-brand {
    font-weight: 600;
    font-size: 1.1rem;
}

.nav-link {
    font-weight: 500;
    transition: color 0.15s ease-in-out;
}

.nav-link:hover {
    color: var(--bs-primary) !important;
}

/* Footer styling */
footer {
    margin-top: auto;
}

/* Dashboard cards */
.dashboard-card {
    transition: transform 0.2s ease-in-out;
}

.dashboard-card:hover {
    transform: translateY(-2px);
}

/* Hover lift effect for cards */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Enhanced stats cards */
.stats-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Card fade-in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

/* Animated progress bars */
@keyframes progressAnimation {
    from { width: 0%; }
}

.progress .progress-bar {
    animation: progressAnimation 1.5s ease-in-out;
}

/* Login page specific responsive improvements */
@media (max-width: 576px) {
    /* Extra small devices */
    .login-card {
        margin: 0.5rem;
    }
    
    .card-header .fa-chalkboard-teacher {
        font-size: 1.8rem !important;
    }
    
    .card-header h2 {
        font-size: 1rem !important;
        line-height: 1.3;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .input-group-text {
        padding: 0.5rem 0.75rem;
    }
    
    .form-control-lg {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    /* Small devices and tablets */
    .vh-100 {
        min-height: 100vh;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    .card-header {
        padding: 0.75rem;
    }
    
    .card-footer {
        padding: 0.5rem !important;
        font-size: 0.8rem;
    }
    
    /* Prevent text overflow */
    .text-truncate-mobile {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Responsive table improvements */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-group-sm .btn {
        padding: 0.25rem 0.4rem;
    }
    
    .badge {
        font-size: 0.7em;
    }
}

/* Print styles for reports */
@media print {
    .navbar,
    .btn,
    .modal,
    .alert,
    footer {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
        break-inside: avoid;
    }
    
    .table-bordered th,
    .table-bordered td {
        border: 1px solid #000 !important;
    }
    
    .signature-box {
        border: 2px solid #000 !important;
        background-color: transparent !important;
    }
    
    /* Ensure good contrast for printing */
    .text-muted {
        color: #6c757d !important;
    }
    
    .badge {
        border: 1px solid #000;
        color: #000 !important;
        background-color: transparent !important;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid var(--bs-primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Accessibility improvements */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Skip to content link for screen readers */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--bs-primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-to-content:focus {
    top: 6px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--bs-border-color);
    }
    
    .btn {
        border-width: 2px;
    }
    
    .table-bordered th,
    .table-bordered td {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    ::before,
    ::after {
        animation-delay: -1ms !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        background-attachment: initial !important;
        scroll-behavior: auto !important;
        transition-duration: 0s !important;
        transition-delay: 0s !important;
    }
}

/* Dark mode specific adjustments */
[data-bs-theme="dark"] .signature-box {
    background-color: var(--bs-dark);
    border-color: var(--bs-secondary);
}

[data-bs-theme="dark"] .stat-card {
    background-color: rgba(var(--bs-light-rgb), 0.1);
}

[data-bs-theme="dark"] .table-success {
    --bs-table-bg: rgba(25, 135, 84, 0.2);
}

[data-bs-theme="dark"] .table-danger {
    --bs-table-bg: rgba(220, 53, 69, 0.2);
}

[data-bs-theme="dark"] .table-warning {
    --bs-table-bg: rgba(255, 193, 7, 0.2);
}
