/**
 * Component Styles - Extracted Inline Styles
 * 
 * Purpose: Centralized CSS for all inline styles extracted from view files
 * Phase 3: Complete inline style extraction for 100% clean HTML
 * 
 * Structure:
 * - Icon Styles
 * - Card & Badge Styles
 * - Layout Utilities
 * - Form Components
 * - Table Styles
 * - Status Indicators
 * - Metadata Display
 * - Practice Components
 * - Admin Components
 * - Verification Components
 * 
 * Version: 1.0.0
 * Created: 2025-10-11
 */

/* ===================================
   ICON STYLES
   =================================== */

/* Large icons (dashboard, stats, empty states) */
.icon-large {
    font-size: 2rem;
}

.icon-xlarge {
    font-size: 3rem;
}

/* Circular icon containers */
.icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-circle-sm {
    width: 40px;
    height: 40px;
}

.icon-circle-lg {
    width: 60px;
    height: 60px;
}

/* Status-specific icon circles */
.icon-circle-warning {
    background-color: var(--warning, #ffc107);
    color: white;
}

.icon-circle-success {
    background-color: var(--success, #28a745);
    color: white;
}

.icon-circle-info {
    background-color: var(--info, #17a2b8);
    color: white;
}

.icon-circle-primary {
    background-color: var(--primary, #0d6efd);
    color: white;
}

.icon-circle-danger {
    background-color: var(--danger, #dc3545);
    color: white;
}

/* ===================================
   METADATA & INFO DISPLAYS
   =================================== */

/* Question metadata container */
.question-meta {
    background: #f8f9fa;
    padding: 8px;
    border-radius: 3px;
    margin-bottom: 10px;
    font-size: 0.8rem;
}

.question-meta-flex {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

/* Debug info box */
.debug-info {
    background: #fff3cd;
    padding: 5px;
    margin-bottom: 5px;
    font-size: 0.7rem;
    border-radius: 3px;
}

/* Instruction section */
.instruction-section {
    margin-top: 10px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 3px;
    font-size: 0.75rem;
}

.instruction-section h6 {
    margin-bottom: 6px;
    color: #2c3e50;
}

.instruction-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

@media (max-width: 576px) {
    .instruction-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   STATUS INDICATORS
   =================================== */

/* Status dots */
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 4px;
}

.status-dot.answered {
    background-color: #28a745;
}

.status-dot.marked {
    background-color: #ffc107;
}

.status-dot.visited {
    background-color: #17a2b8;
}

.status-dot.not-visited {
    background-color: #dee2e6;
}

/* Status indicator flex container */
.status-indicator-item {
    display: flex;
    align-items: center;
}

/* ===================================
   LAYOUT UTILITIES
   =================================== */

/* Max width containers */
.max-w-800 {
    max-width: 800px;
}

.max-w-900 {
    max-width: 900px;
}

.max-w-1000 {
    max-width: 1000px;
}

.max-w-1200 {
    max-width: 1200px;
}

/* Flexbox utilities not in Bootstrap */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-wrap-gap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ===================================
   BUTTON EXTENSIONS
   =================================== */

/* Bulk action buttons (initially hidden) */
.bulk-actions-group {
    display: none;
}

.bulk-actions-group.show {
    display: inline-flex;
}

/* Minimum width buttons */
.btn-min-w-120 {
    min-width: 120px;
}

.btn-min-w-150 {
    min-width: 150px;
}

.btn-min-w-100 {
    min-width: 100px;
}

/* Mobile button sizing (iOS/Android standards) */
@media (max-width: 767px) {
    .btn,
    button,
    a.btn {
        min-height: 48px !important;  /* iOS standard (44px + 4px margin) */
        min-width: 48px !important;
        padding: 0.75rem 1rem !important;
        font-size: 1rem !important;
    }
    
    .btn-sm {
        min-height: 40px !important;
        min-width: 40px !important;
        padding: 0.625rem 0.875rem !important;
        font-size: 0.875rem !important;
    }
    
    .btn-lg {
        min-height: 56px !important;
        min-width: 56px !important;
        padding: 1rem 1.5rem !important;
        font-size: 1.125rem !important;
    }
}

/* ===================================
   BADGE & LABEL STYLES
   =================================== */

/* Color-coded badges */
.badge-success-subtle {
    background-color: #d4edda;
    color: #155724;
}

.badge-warning-subtle {
    background-color: #fff3cd;
    color: #856404;
}

.badge-danger-subtle {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-info-subtle {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* ===================================
   CARD EXTENSIONS
   =================================== */

/* Hover effects for interactive cards */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Card with colored left border */
.card-border-left-primary {
    border-left: 4px solid var(--primary, #0d6efd);
}

.card-border-left-success {
    border-left: 4px solid var(--success, #28a745);
}

.card-border-left-warning {
    border-left: 4px solid var(--warning, #ffc107);
}

.card-border-left-danger {
    border-left: 4px solid var(--danger, #dc3545);
}

.card-border-left-info {
    border-left: 4px solid var(--info, #17a2b8);
}

/* ===================================
   PRACTICE PAGE COMPONENTS
   =================================== */

/* Question navigation panel */
.question-nav-panel {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
}

/* Question number grid */
.question-number-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

@media (max-width: 576px) {
    .question-number-grid {
        grid-template-columns: repeat(auto-fill, minmax(35px, 1fr));
        gap: 6px;
    }
}

/* Question number button */
.question-number-btn {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    border: 1px solid #dee2e6;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.question-number-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.question-number-btn.answered {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

.question-number-btn.marked {
    background-color: #ffc107;
    color: #212529;
    border-color: #ffc107;
}

.question-number-btn.visited {
    background-color: #17a2b8;
    color: white;
    border-color: #17a2b8;
}

.question-number-btn.not-visited {
    background-color: #f8f9fa;
    color: #495057;
    border-color: #dee2e6;
}

.question-number-btn.current {
    border: 2px solid #0d6efd;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

/* ===================================
   ADMIN TABLE COMPONENTS
   =================================== */

/* Table action buttons container */
.table-actions {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

@media (max-width: 576px) {
    .table-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Empty state in tables */
.table-empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: #6c757d;
}

.table-empty-state i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* ===================================
   VERIFICATION COMPONENTS
   =================================== */

/* Verification status badges */
.verification-badge {
    padding: 0.35em 0.65em;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.25rem;
}

.verification-badge-pending {
    background-color: #fff3cd;
    color: #856404;
}

.verification-badge-approved {
    background-color: #d4edda;
    color: #155724;
}

.verification-badge-needs-changes {
    background-color: #fff3cd;
    color: #856404;
}

.verification-badge-rejected {
    background-color: #f8d7da;
    color: #721c24;
}

/* Flagged fields indicator */
.flagged-fields-list {
    background: #fff3cd;
    border-left: 3px solid #ffc107;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 8px 0;
}

/* Verifier notes display */
.verifier-notes {
    background: #f8f9fa;
    border-left: 3px solid #0d6efd;
    padding: 10px 15px;
    border-radius: 4px;
    font-style: italic;
}

/* ===================================
   TEST SERIES COMPONENTS
   =================================== */

/* Test series difficulty badges */
.difficulty-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.25rem;
}

.difficulty-badge-easy {
    background-color: #d4edda;
    color: #155724;
}

.difficulty-badge-medium {
    background-color: #fff3cd;
    color: #856404;
}

.difficulty-badge-hard {
    background-color: #f8d7da;
    color: #721c24;
}

/* Test series card pricing */
.pricing-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success, #28a745);
}

.pricing-original {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 1rem;
    font-weight: 400;
    margin-left: 0.5rem;
}

/* ===================================
   ANALYTICS COMPONENTS
   =================================== */

/* Stat card value displays */
.stat-value-large {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-value-medium {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Chart containers */
.chart-container {
    position: relative;
    height: 300px;
}

@media (max-width: 576px) {
    .chart-container {
        height: 250px;
    }
}

/* ===================================
   FORM COMPONENTS
   =================================== */

/* Form section spacing */
.form-section {
    margin-bottom: 2rem;
}

.form-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

/* Form groups with icons */
.form-group-icon {
    position: relative;
}

.form-group-icon .input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.form-group-icon input,
.form-group-icon select {
    padding-left: 38px;
}

/* Required field indicator */
.form-label-required::after {
    content: '*';
    color: var(--danger, #dc3545);
    margin-left: 0.25rem;
}

/* ===================================
   IMPORT/PREVIEW COMPONENTS
   =================================== */

/* Import preview table */
.import-preview-table {
    font-size: 0.875rem;
}

.import-preview-table td {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Import status indicators */
.import-status-valid {
    color: var(--success, #28a745);
    font-weight: 600;
}

.import-status-warning {
    color: var(--warning, #ffc107);
    font-weight: 600;
}

.import-status-error {
    color: var(--danger, #dc3545);
    font-weight: 600;
}

/* ===================================
   PAYMENT COMPONENTS
   =================================== */

/* Payment amount display */
.payment-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--success, #28a745);
}

/* Payment status badges */
.payment-status {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.25rem;
}

.payment-status-success {
    background-color: #d4edda;
    color: #155724;
}

.payment-status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.payment-status-failed {
    background-color: #f8d7da;
    color: #721c24;
}

/* ===================================
   PROFILE COMPONENTS
   =================================== */

/* Profile image container */
.profile-image-container {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #e9ecef;
    margin: 0 auto 1rem;
}

@media (max-width: 576px) {
    .profile-image-container {
        width: 120px;
        height: 120px;
    }
}

/* Profile stats */
.profile-stat {
    text-align: center;
    padding: 1rem;
}

.profile-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary, #0d6efd);
}

.profile-stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===================================
   VERIFICATION PAGE STYLES
   =================================== */

/* Field flag checkboxes */
.field-flag-checkbox {
    min-width: 24px;
    min-height: 24px;
    margin-right: 8px;
}

/* Verification action buttons */
.verification-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

@media (max-width: 767px) {
    .verification-actions {
        flex-direction: column;
    }
    
    .verification-actions .btn {
        width: 100%;
    }
}

/* Verification notes textarea */
.verification-notes-textarea {
    min-height: 100px;
    resize: vertical;
}

/* ===================================
   THEME MANAGEMENT COMPONENTS
   =================================== */

/* Color preview box */
.color-preview {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.color-preview:hover {
    transform: scale(1.1);
}

/* Theme preset cards */
.theme-preset-card {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.theme-preset-card:hover {
    border-color: var(--primary, #0d6efd);
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.theme-preset-card.active {
    border-color: var(--primary, #0d6efd);
    background-color: rgba(13, 110, 253, 0.05);
}

/* ===================================
   TEST SERIES MANAGEMENT
   =================================== */

/* Hierarchy indicator */
.hierarchy-level {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #e9ecef;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.hierarchy-level-main {
    background-color: #d1ecf1;
    color: #0c5460;
}

.hierarchy-level-sub {
    background-color: #d4edda;
    color: #155724;
}

.hierarchy-level-individual {
    background-color: #fff3cd;
    color: #856404;
}

/* Test series status indicators */
.series-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.series-status-published {
    background-color: #d4edda;
    color: #155724;
}

.series-status-draft {
    background-color: #e2e3e5;
    color: #383d41;
}

.series-status-active {
    background-color: #d1ecf1;
    color: #0c5460;
}

.series-status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

/* ===================================
   MOBILE SPECIFIC OVERRIDES
   =================================== */

@media (max-width: 767px) {
    /* Stack metadata on mobile */
    .question-meta-flex {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Full width status indicators on mobile */
    .instruction-grid {
        grid-template-columns: 1fr;
    }
    
    /* Larger touch targets for status dots */
    .status-dot {
        width: 12px;
        height: 12px;
        margin-right: 6px;
    }
    
    /* Icon circles slightly smaller on mobile */
    .icon-circle {
        width: 45px;
        height: 45px;
    }
}

/* ===================================
   PRINT STYLES (Remove inline styles that affect printing)
   =================================== */

@media print {
    .question-meta,
    .instruction-section,
    .debug-info {
        background: white !important;
        border: 1px solid #dee2e6;
    }
    
    .icon-circle {
        background: white !important;
        border: 2px solid #212529;
    }
}

/* ===================================
   ACCESSIBILITY ENHANCEMENTS
   =================================== */

/* Focus states for custom components */
.question-number-btn:focus {
    outline: 2px solid var(--primary, #0d6efd);
    outline-offset: 2px;
}

.color-preview:focus {
    outline: 2px solid var(--primary, #0d6efd);
    outline-offset: 2px;
}

/* ===================================
   UTILITY CLASSES FOR COMMON INLINE STYLES
   =================================== */

/* Background colors */
.bg-light-gray {
    background-color: #f8f9fa;
}

.bg-lighter {
    background-color: #fafbfc;
}

/* Borders */
.border-left-3 {
    border-left: 3px solid;
}

.border-left-4 {
    border-left: 4px solid;
}

/* Rounded corners */
.rounded-3 {
    border-radius: 3px;
}

.rounded-4 {
    border-radius: 4px;
}

.rounded-8 {
    border-radius: 8px;
}

/* Font sizes not in Bootstrap */
.fs-7 {
    font-size: 0.875rem;
}

.fs-8 {
    font-size: 0.8rem;
}

.fs-9 {
    font-size: 0.75rem;
}

.fs-10 {
    font-size: 0.7rem;
}

/* Spacing utilities */
.gap-2px {
    gap: 2px;
}

.gap-4px {
    gap: 4px;
}

.gap-6px {
    gap: 6px;
}

.gap-8px {
    gap: 8px;
}

/* ===================================
   RESPONSIVE VISIBILITY
   =================================== */

/* Hide on mobile only */
@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Hide on desktop only */
@media (min-width: 768px) {
    .hide-desktop {
        display: none !important;
    }
}

/* ===================================
   DARK MODE SUPPORT
   =================================== */

@media (prefers-color-scheme: dark) {
    .question-meta,
    .instruction-section {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .question-number-btn {
        background: #2d3748;
        color: #e2e8f0;
        border-color: #4a5568;
    }
    
    .question-number-btn:hover {
        background: #374151;
    }
    
    .debug-info {
        background: #4a5568;
        color: #f7fafc;
    }
}

/* ===================================
   ANIMATION UTILITIES
   =================================== */

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Slide up animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.4s ease-out;
}

/* Pulse animation for status indicators */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* ===================================
   END OF COMPONENT STYLES
   =================================== */
