/* UPT Vector Enhanced Styles */

/* Spinning animation for Bootstrap Icons */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.bi.spinning {
    animation: spin 1s linear infinite;
    display: inline-block;
}
/* Comprehensive styling for better UX and mobile optimization */

/* Base Styles */
.upt-vector-container {
    font-family: 'Montserrat', 'HelveticaNeue', 'Helvetica Neue', 'Helvetica-Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #444444;
}

/* Card Enhancements - Remove all shadows and hover effects */
.card,
.card:hover,
.card:focus,
.card:active {
    border: 1px solid #e3e6f0;
    border-radius: 0.5rem;
    box-shadow: none !important;
    transition: none !important;
    transform: none !important;
}

/* Override any Bootstrap or other framework shadows */
.card.shadow,
.card.shadow-sm,
.card.shadow-lg,
.card[class*="shadow"] {
    box-shadow: none !important;
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    font-weight: 600;
    color: #5a5c69;
}

/* Badge Styles */
.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

.badge-staff {
    background-color: #dc3545;
    color: white;
}

.badge-examiner {
    background-color: #17a2b8;
    color: white;
}

.badge-instructor {
    background-color: #28a745;
    color: white;
}

.badge-dropzone {
    background-color: #ffc107;
    color: #212529;
}

.badge-candidate {
    background-color: #6c757d;
    color: white;
}

/* Button Enhancements */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.btn-primary {
    background-color: #4e73df;
    border-color: #4e73df;
}

.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2e59d9;
}

.btn-success {
    background-color: #1cc88a;
    border-color: #1cc88a;
}

.btn-success:hover {
    background-color: #17a673;
    border-color: #17a673;
}

.btn-info {
    background-color: #36b9cc;
    border-color: #36b9cc;
}

.btn-info:hover {
    background-color: #2c9faf;
    border-color: #2c9faf;
}

.btn-warning {
    background-color: #f6c23e;
    border-color: #f6c23e;
    color: #212529;
}

.btn-warning:hover {
    background-color: #f4b619;
    border-color: #f4b619;
    color: #212529;
}

.btn-danger {
    background-color: #e74a3b;
    border-color: #e74a3b;
}

.btn-danger:hover {
    background-color: #e02d1b;
    border-color: #e02d1b;
}

/* Form Enhancements */
.form-control {
    border-radius: 0.375rem;
    border: 1px solid #d1d3e2;
    background-color: #ffffff;
    color: #444444;
    transition: all 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #bac8f3;
    background-color: #ffffff;
    color: #444444;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.form-control::placeholder {
    color: #6c757d;
}

/* Ensure form controls stay in light mode */
input.form-control,
textarea.form-control,
select.form-control {
    background-color: #ffffff !important;
    color: #444444 !important;
    border-color: #d1d3e2 !important;
}

input.form-control:focus,
textarea.form-control:focus,
select.form-control:focus {
    background-color: #ffffff !important;
    color: #444444 !important;
    border-color: #bac8f3 !important;
}

/* Override any dark mode styles for form controls */
.upt-vector-container input,
.upt-vector-container textarea,
.upt-vector-container select {
    background-color: #ffffff !important;
    color: #444444 !important;
    border-color: #d1d3e2 !important;
}

.upt-vector-container input:focus,
.upt-vector-container textarea:focus,
.upt-vector-container select:focus {
    background-color: #ffffff !important;
    color: #444444 !important;
    border-color: #bac8f3 !important;
}

/* Force light mode for form elements within UPT Vector plugin only */
.upt-vector-container input[type="text"],
.upt-vector-container input[type="email"],
.upt-vector-container input[type="password"],
.upt-vector-container input[type="number"],
.upt-vector-container input[type="date"],
.upt-vector-container input[type="time"],
.upt-vector-container input[type="search"],
.upt-vector-container textarea,
.upt-vector-container select {
    background-color: #ffffff !important;
    color: #444444 !important;
    border-color: #d1d3e2 !important;
}

.upt-vector-container input[type="text"]:focus,
.upt-vector-container input[type="email"]:focus,
.upt-vector-container input[type="password"]:focus,
.upt-vector-container input[type="number"]:focus,
.upt-vector-container input[type="date"]:focus,
.upt-vector-container input[type="time"]:focus,
.upt-vector-container input[type="search"]:focus,
.upt-vector-container textarea:focus,
.upt-vector-container select:focus {
    background-color: #ffffff !important;
    color: #444444 !important;
    border-color: #bac8f3 !important;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25) !important;
}

.form-label {
    font-weight: 600;
    color: #5a5c69;
    margin-bottom: 0.5rem;
}

/* Table Enhancements */
.table {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fc;
    border-bottom: 2px solid #e3e6f0;
    font-weight: 600;
    color: #5a5c69;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: all 0.15s ease-in-out;
}

.table tbody tr:hover {
    background-color: #f8f9fc;
}

/* Progress Bars */
.progress {
    height: 1rem;
    border-radius: 0.5rem;
    background-color: #eaecf4;
}

.progress-bar {
    border-radius: 0.5rem;
    transition: width 0.6s ease;
}

/* Alert Enhancements */
.alert {
    border-radius: 0.5rem;
    border: none;
    font-weight: 500;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
}

.alert-info {
    background-color: #d1ecf1;
    color: #055160;
}

/* Modal Enhancements */
.modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    border-radius: 0.5rem 0.5rem 0 0;
}

.modal-footer {
    background-color: #f8f9fc;
    border-top: 1px solid #e3e6f0;
    border-radius: 0 0 0.5rem 0.5rem;
}

/* Search and Typeahead */
.list-group-item {
    border: 1px solid #e3e6f0;
    transition: all 0.15s ease-in-out;
}

.list-group-item:hover {
    background-color: #f8f9fc;
    border-color: #bac8f3;
}

.list-group-item-action {
    cursor: pointer;
}

/* Profile Photo */
.profile-photo {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 4px solid #e3e6f0;
    transition: all 0.15s ease-in-out;
}

.profile-photo:hover {
    border-color: #4e73df;
    transform: scale(1.05);
}

/* Chart Containers */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Loading States */
.spinner-border {
    color: #4e73df;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .container-fluid {
        padding: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .btn-group-vertical .btn {
        margin-bottom: 0.25rem;
    }
    
    .table-responsive {
        border-radius: 0.5rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-dialog-lg {
        max-width: calc(100% - 1rem);
    }
    
    .profile-photo {
        width: 120px;
        height: 120px;
    }
    
    .chart-container {
        height: 250px;
    }
    
    .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .d-flex.justify-content-between > div:last-child {
        margin-top: 0.5rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding: 0.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    .form-control {
        font-size: 0.875rem;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    .profile-photo {
        width: 100px;
        height: 100px;
    }
    
    .chart-container {
        height: 200px;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h5 {
        font-size: 1.1rem;
    }
}

/* Print Styles */
@media print {
    .btn,
    .modal,
    .alert {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000;
        box-shadow: none;
        break-inside: avoid;
    }
    
    .table {
        font-size: 0.8rem;
    }
    
    .badge {
        border: 1px solid #000;
        background-color: transparent !important;
        color: #000 !important;
    }
}

/* Dark Mode Support - Only apply when explicitly in dark mode */
@media (prefers-color-scheme: dark) and (min-width: 1px) {
    /* Only apply dark mode if user explicitly prefers it AND we're not forcing light mode */
    .upt-vector-container.dark-mode {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .upt-vector-container.dark-mode .card {
        background-color: #2d2d2d;
        border-color: #404040;
        color: #e0e0e0;
    }
    
    .upt-vector-container.dark-mode .card-header {
        background-color: #3a3a3a;
        border-bottom-color: #404040;
        color: #e0e0e0;
    }
    
    .upt-vector-container.dark-mode .form-control {
        background-color: #2d2d2d;
        border-color: #404040;
        color: #e0e0e0;
    }
    
    .upt-vector-container.dark-mode .form-control:focus {
        background-color: #2d2d2d;
        border-color: #4e73df;
        color: #e0e0e0;
    }
    
    .upt-vector-container.dark-mode .table {
        color: #e0e0e0;
    }
    
    .upt-vector-container.dark-mode .table thead th {
        background-color: #3a3a3a;
        border-bottom-color: #404040;
        color: #e0e0e0;
    }
    
    .upt-vector-container.dark-mode .table tbody tr:hover {
        background-color: #3a3a3a;
    }
    
    .upt-vector-container.dark-mode .list-group-item {
        background-color: #2d2d2d;
        border-color: #404040;
        color: #e0e0e0;
    }
    
    .upt-vector-container.dark-mode .list-group-item:hover {
        background-color: #3a3a3a;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

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

/* Utility Classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15) !important;
}

.shadow-lg {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.border-radius-lg {
    border-radius: 0.5rem !important;
}

.border-radius-xl {
    border-radius: 1rem !important;
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-active {
    background-color: #28a745;
}

.status-pending {
    background-color: #ffc107;
}

.status-expired {
    background-color: #dc3545;
}

.status-inactive {
    background-color: #6c757d;
}

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

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

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

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

/* Focus States for Accessibility */
.btn:focus,
.form-control:focus,
.list-group-item:focus {
    outline: 2px solid #4e73df;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid #000;
    }
    
    .form-control {
        border: 2px solid #000;
    }
    
    .badge {
        border: 1px solid #000;
    }
}

/* Ensure checkboxes are visible */
input[type="checkbox"],
.form-check-input[type="checkbox"],
#hard-card-option,
[id^="hard-card-"] {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 1em !important;
    height: 1em !important;
    margin-top: 0.25em !important;
    margin-right: 0.5em !important;
    vertical-align: top !important;
    background-color: #fff !important;
    border: 1px solid #dee2e6 !important;
    appearance: checkbox !important;
    -webkit-appearance: checkbox !important;
    -moz-appearance: checkbox !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
}

input[type="checkbox"]:checked,
.form-check-input[type="checkbox"]:checked,
#hard-card-option:checked,
[id^="hard-card-"]:checked {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
}

/* FORCE REMOVE ALL CARD SHADOWS AND HOVER EFFECTS */
.card,
.card:hover,
.card:focus,
.card:active,
.card * {
    box-shadow: none !important;
    transition: none !important;
    transform: none !important;
}

/* Specific overrides for profile page cards */
.upt-vector-container .card,
.upt-vector-container .card:hover,
.upt-vector-container .card:focus,
.upt-vector-container .card:active {
    box-shadow: none !important;
    transition: none !important;
    transform: none !important;
}

/* Override any framework shadows */
.card.shadow,
.card.shadow-sm,
.card.shadow-lg,
.card[class*="shadow"],
.card[style*="box-shadow"] {
    box-shadow: none !important;
}

/* NUCLEAR OPTION - Force remove ALL shadows from ALL elements */
* {
    box-shadow: none !important;
}

/* But allow shadows for specific elements that need them */
.modal-content,
.dropdown-menu,
.tooltip,
.popover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

