/**
 * Custom Styles for HR Virtual Interview Portal
 */

/* ========================================
   Global Styles
   ======================================== */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

.container-fluid {
    max-width: 1400px;
}

/* ========================================
   Sidebar Layout
   ======================================== */

#wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

#sidebar-wrapper {
    min-height: 100vh;
    width: 250px;
    margin-left: -250px;
    transition: margin 0.25s ease-out;
    background: linear-gradient(180deg, var(--primary-color, #0d6efd) 0%, #0a58ca 100%);
    position: fixed;
    height: 100%;
    z-index: 1000;
}

#wrapper.toggled #sidebar-wrapper {
    margin-left: 0;
}

#page-content-wrapper {
    width: 100%;
    transition: all 0.25s ease-out;
    margin-left: 0;
}

#wrapper.toggled #page-content-wrapper {
    margin-left: 250px;
}

.sidebar-heading {
    font-size: 1.2rem;
    font-weight: 700;
}

.list-group-item {
    border: none !important;
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    padding-left: 2rem;
}

.list-group-item.active {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-left: 4px solid white !important;
    font-weight: 600;
}

/* Desktop: Always show sidebar */
@media (min-width: 768px) {
    #sidebar-wrapper {
        margin-left: 0;
    }
    
    #page-content-wrapper {
        margin-left: 250px;
        width: calc(100% - 250px);
    }
    
    #wrapper.toggled #sidebar-wrapper {
        margin-left: -250px;
    }
    
    #wrapper.toggled #page-content-wrapper {
        margin-left: 0;
        width: 100%;
    }
}

/* ========================================
   Cards & Panels
   ======================================== */

.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.3s ease;
}

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

.card-header {
    border-bottom: 2px solid #0d6efd;
    font-weight: 600;
}

/* ========================================
   Navigation
   ======================================== */

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-brand img {
    border-radius: 4px;
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    transform: translateY(-2px);
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.btn i {
    margin-right: 0.25rem;
}

/* ========================================
   Tables
   ======================================== */

.table {
    background-color: white;
}

.table thead th {
    border-top: none;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

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

/* ========================================
   Badges & Status Indicators
   ======================================== */

.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
    font-size: 0.875rem;
}

/* ========================================
   Forms
   ======================================== */

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

textarea.form-control {
    resize: vertical;
}

/* ========================================
   Job Description Display
   ======================================== */

.job-description {
    line-height: 1.8;
    max-height: 400px;
    overflow-y: auto;
}

.job-description::-webkit-scrollbar {
    width: 8px;
}

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

.job-description::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.job-description::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ========================================
   Dashboard Statistics Cards
   ======================================== */

.card.text-white .card-body {
    position: relative;
    overflow: hidden;
}

.card.text-white h2 {
    font-weight: 700;
    font-size: 2.5rem;
}

.card.text-white h5 {
    font-weight: 500;
    opacity: 0.9;
}

/* ========================================
   Report Content
   ======================================== */

.report-content {
    line-height: 1.8;
}

.report-content h1,
.report-content h2,
.report-content h3 {
    color: #0d6efd;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.report-content h1 {
    font-size: 1.75rem;
    border-bottom: 2px solid #0d6efd;
    padding-bottom: 0.5rem;
}

.report-content h2 {
    font-size: 1.5rem;
}

.report-content h3 {
    font-size: 1.25rem;
}

.report-content ul {
    list-style-type: disc;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.report-content li {
    margin-bottom: 0.5rem;
}

.report-content strong {
    color: #212529;
    font-weight: 600;
}

/* ========================================
   Progress Bar
   ======================================== */

.progress {
    border-radius: 0.5rem;
    overflow: hidden;
}

.progress-bar {
    font-weight: 600;
    font-size: 0.875rem;
}

/* ========================================
   Alerts
   ======================================== */

.alert {
    border: none;
    border-left: 4px solid;
}

.alert-success {
    border-left-color: #198754;
    background-color: #d1e7dd;
}

.alert-danger {
    border-left-color: #dc3545;
    background-color: #f8d7da;
}

.alert-warning {
    border-left-color: #ffc107;
    background-color: #fff3cd;
}

.alert-info {
    border-left-color: #0dcaf0;
    background-color: #cff4fc;
}

/* ========================================
   Modal Enhancements
   ======================================== */

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

.modal-header {
    border-bottom: 2px solid #0d6efd;
}

/* ========================================
   Breadcrumb
   ======================================== */

.breadcrumb {
    background-color: transparent;
    padding: 0.75rem 0;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.25rem;
}

/* ========================================
   Footer
   ======================================== */

footer {
    margin-top: auto;
    border-top: 1px solid #dee2e6;
}

/* ========================================
   Login/Register Pages
   ======================================== */

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

.card.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

/* ========================================
   Interview Interface
   ======================================== */

#interviewScreen .card.bg-light {
    border-left: 4px solid #0d6efd;
}

#answerText {
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
}

/* ========================================
   Spinner/Loading States
   ======================================== */

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* ========================================
   Utility Classes
   ======================================== */

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

.shadow-hover {
    transition: box-shadow 0.3s ease;
}

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

/* ========================================
   Responsive Adjustments
   ======================================== */

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .card.text-white h2 {
        font-size: 2rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-group .btn {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    body {
        background-color: white;
    }
    
    .navbar,
    .breadcrumb,
    .btn,
    footer,
    .card-header {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #000 !important;
        page-break-inside: avoid;
    }
    
    .container-fluid {
        max-width: 100%;
    }
}

/* ========================================
   Animation Classes
   ======================================== */

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

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* ========================================
   Custom Scrollbar
   ======================================== */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

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