/**
 * DEI Workshop Activities Web Application
 * Main Stylesheet
 * 
 * Using Bootstrap 5 with custom styling
 */

/* ========================================
   CSS Variables
   ======================================== */
:root {
    --primary-color: #2c5f2d;
    --primary-light: #97bc62;
    --secondary-color: #4a7c59;
    --accent-color: #8fbc8f;
    --dark-color: #1a3a1a;
    --light-color: #f8f9fa;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
}

/* ========================================
   Global Styles
   ======================================== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f7fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
}

.main-content {
    flex: 1;
    padding-top: 76px; /* Account for fixed navbar */
}

/* ========================================
   Navbar Styles
   ======================================== */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
}

.navbar-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
}

.brand-icon {
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
}

/* ========================================
   Card Styles
   ======================================== */
.card {
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.card-header {
    border-bottom: none;
    border-radius: 0.75rem 0.75rem 0 0 !important;
}

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

/* ========================================
   Stat Cards
   ======================================== */
.stat-card {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card-primary {
    border-left-color: var(--primary-color);
}

.stat-card-success {
    border-left-color: var(--success-color);
}

.stat-card-info {
    border-left-color: var(--info-color);
}

.stat-card-warning {
    border-left-color: var(--warning-color);
}

.stat-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   Button Styles
   ======================================== */
.btn {
    font-weight: 500;
    border-radius: 0.5rem;
    padding: 0.5rem 1.25rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border-color: var(--secondary-color);
    transform: translateY(-1px);
}

.btn-lg {
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
}

/* ========================================
   Login Page
   ======================================== */
.login-page {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    min-height: 100vh;
}

.login-container {
    min-height: 100vh;
}

/* ========================================
   Tables
   ======================================== */
.table th {
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    border-bottom-width: 1px;
}

.table td {
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(44, 95, 45, 0.05);
}

/* ========================================
   Badges
   ======================================== */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
    border-radius: 0.375rem;
}

.badge-sm {
    font-size: 0.7rem;
    padding: 0.25em 0.5em;
}

/* ========================================
   Progress Bars
   ======================================== */
.progress {
    border-radius: 0.5rem;
    overflow: hidden;
}

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

/* ========================================
   Forms
   ======================================== */
.form-control,
.form-select {
    border-radius: 0.5rem;
    border-color: #dee2e6;
    padding: 0.625rem 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 95, 45, 0.25);
}

.form-label {
    font-weight: 500;
    color: #495057;
}

/* ========================================
   Alerts
   ======================================== */
.alert {
    border-radius: 0.75rem;
    border: none;
}

/* ========================================
   Avatar
   ======================================== */
.avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* ========================================
   Modals
   ======================================== */
.modal-content {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
}

.modal-header {
    border-bottom: none;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
}

/* ========================================
   Dropdown
   ======================================== */
.dropdown-menu {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
}

.dropdown-item:hover {
    background-color: rgba(44, 95, 45, 0.1);
}

/* ========================================
   Participant Selection
   ======================================== */
.participant-select-page {
    background: linear-gradient(135deg, #f5f7fa, #e4e8ec);
}

/* ========================================
   Activity Cards
   ======================================== */
.activity-card {
    border-radius: 1rem;
}

.activity-card .activity-icon {
    transition: all 0.3s ease;
}

.activity-card:hover .activity-icon {
    transform: scale(1.1);
}

/* ========================================
   Drag and Drop Styles
   ======================================== */
.draggable-item {
    cursor: grab;
    user-select: none;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.draggable-item:hover {
    background-color: #e9ecef !important;
    border-color: var(--primary-color);
}

.draggable-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.drop-zone {
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
    min-height: 150px;
    transition: all 0.2s ease;
}

.drop-zone.drag-over {
    border-color: var(--primary-color);
    background-color: rgba(44, 95, 45, 0.1);
}

.drop-zone .sorted-item {
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

/* ========================================
   Scenario Questions
   ======================================== */
.option-btn {
    padding: 1rem 1.25rem;
    text-align: left;
    transition: all 0.2s ease;
    border-width: 2px;
}

.option-btn:hover {
    transform: translateX(5px);
    border-color: var(--primary-color);
    background-color: rgba(44, 95, 45, 0.05);
}

.option-btn.selected {
    border-color: var(--primary-color);
    background-color: rgba(44, 95, 45, 0.1);
}

.option-btn.correct {
    border-color: var(--success-color);
    background-color: rgba(40, 167, 69, 0.1);
}

.option-btn.incorrect {
    border-color: var(--danger-color);
    background-color: rgba(220, 53, 69, 0.1);
}

.option-letter {
    font-size: 0.875rem;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   Tabs
   ======================================== */
.nav-pills .nav-link {
    border-radius: 0.5rem;
    color: #6c757d;
    font-weight: 500;
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.nav-tabs {
    border-bottom: 2px solid #dee2e6;
}

.nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    font-weight: 500;
    position: relative;
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    background: none;
}

.nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
}

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

/* ========================================
   Utilities
   ======================================== */
.bg-opacity-10 {
    --bs-bg-opacity: 0.1;
}

.font-monospace {
    font-family: 'Fira Code', 'Consolas', monospace;
}

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

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 768px) {
    .main-content {
        padding-top: 70px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
    }
    
    .btn-lg {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .activity-card .card-body {
        padding: 1.5rem;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .navbar,
    .footer,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        padding-top: 0;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6;
    }
}
