/* HY Coaching Institute Schedule Manager - Professional Frontend Styles */
/* Clean, Expert-Level Design System */

/* =============================================================================
   CSS VARIABLES - PROFESSIONAL COLOR PALETTE
   ============================================================================= */
:root {
    /* Core Colors */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary-color: #64748b;
    --secondary-hover: #475569;
    
    /* Semantic Colors */
    --success-color: #059669;
    --success-light: #d1fae5;
    --warning-color: #d97706;
    --warning-light: #fef3c7;
    --danger-color: #dc2626;
    --danger-light: #fee2e2;
    
    /* Neutral Colors */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    
    /* Borders */
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-width: 1px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-colors: color 150ms cubic-bezier(0.4, 0, 0.2, 1), background-color 150ms cubic-bezier(0.4, 0, 0.2, 1), border-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================================================
   RESET AND BASE STYLES
   ============================================================================= */
.hycism-frontend-container * {
    box-sizing: border-box;
}

.hycism-frontend-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-6);
    font-family: var(--font-family);
    color: var(--gray-900);
    line-height: 1.6;
    background-color: #ffffff;
}

/* =============================================================================
   HEADER SECTION
   ============================================================================= */
.hycism-schedule-header {
    margin-bottom: var(--space-8);
    text-align: center;
}

.hycism-schedule-header h2 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 var(--space-6) 0;
    letter-spacing: -0.025em;
}

/* =============================================================================
   FILTER SECTION - SINGLE LINE LAYOUT
   ============================================================================= */
.hycism-filter-section {
    background: var(--gray-50);
    border: var(--border-width) solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-8);
}

.hycism-main-filters-row {
    display: flex;
    align-items: end;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.hycism-filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    min-width: 160px;
    flex: 1;
}

.hycism-filter-group label {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--gray-700);
}

.hycism-filter-group input,
.hycism-filter-group select {
    padding: var(--space-3) var(--space-4);
    border: var(--border-width) solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    background-color: white;
    transition: var(--transition-colors);
}

.hycism-filter-group input:focus,
.hycism-filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.hycism-filter-actions {
    display: flex;
    gap: var(--space-3);
    align-items: center;
}

/* =============================================================================
   BUTTON STYLES
   ============================================================================= */
.hycism-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-5);
    font-size: var(--font-size-sm);
    font-weight: 500;
    border-radius: var(--border-radius);
    border: var(--border-width) solid transparent;
    cursor: pointer;
    transition: var(--transition-colors);
    text-decoration: none;
    white-space: nowrap;
}

.hycism-btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.hycism-btn-primary:hover {
    background-color: var(--primary-hover);
}

.hycism-btn-secondary {
    background-color: white;
    color: var(--gray-700);
    border-color: var(--gray-300);
}

.hycism-btn-secondary:hover {
    background-color: var(--gray-50);
    color: var(--gray-900);
}

.hycism-btn-sm {
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-xs);
}

.hycism-btn-edit {
    background-color: var(--warning-color);
    color: white;
}

.hycism-btn-edit:hover {
    background-color: #b45309;
}

.hycism-btn-delete {
    background-color: var(--danger-color);
    color: white;
}

.hycism-btn-delete:hover {
    background-color: #b91c1c;
}

.hycism-btn-add {
    background-color: var(--success-color);
    color: white;
}

.hycism-btn-add:hover {
    background-color: #047857;
}

.hycism-btn-whatsapp {
    background-color: #25d366;
    color: white;
}

.hycism-btn-whatsapp:hover {
    background-color: #22c55e;
}

.hycism-btn-export {
    background-color: var(--secondary-color);
    color: white;
}

.hycism-btn-export:hover {
    background-color: var(--secondary-hover);
}

/* =============================================================================
   ADVANCED OPTIONS (COLLAPSIBLE)
   ============================================================================= */
.hycism-advanced-options {
    margin-top: var(--space-6);
    border-top: var(--border-width) solid var(--gray-200);
    padding-top: var(--space-6);
}

.hycism-toggle-advanced {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) 0;
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-colors);
}

.hycism-toggle-advanced:hover {
    color: var(--primary-hover);
}

.hycism-chevron {
    transition: transform 150ms ease;
}

.hycism-toggle-advanced.active .hycism-chevron {
    transform: rotate(180deg);
}

.hycism-advanced-content {
    margin-top: var(--space-4);
    padding: var(--space-6);
    background: white;
    border: var(--border-width) solid var(--gray-200);
    border-radius: var(--border-radius);
}

/* =============================================================================
   EXPORT AND COPY SECTIONS
   ============================================================================= */

/* Professional Export Options Direct Display */
.hycism-export-options-direct {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
}

.hycism-export-options-direct::before {
    content: '📊 Export & Share Options';
    position: absolute;
    top: -12px;
    left: 20px;
    background: #fff;
    padding: 4px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    border-radius: 20px;
    border: 1px solid #dee2e6;
}

.hycism-export-section,
.hycism-copy-section {
    margin-bottom: var(--space-6);
}

.hycism-export-tabs,
.hycism-copy-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: #fff;
    padding: 6px;
    border-radius: 50px;
    border: 1px solid #e9ecef;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.hycism-tab-button {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: #6c757d;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border-radius: 25px;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    white-space: nowrap;
}

.hycism-tab-button:hover {
    color: #495057;
    background: rgba(108, 117, 125, 0.1);
    transform: translateY(-1px);
}

.hycism-tab-button.active {
    background: linear-gradient(135deg, #007cba 0%, #005a8b 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
    transform: translateY(-2px);
}

.hycism-tab-button.active:hover {
    background: linear-gradient(135deg, #005a8b 0%, #007cba 100%);
    color: white;
}

.hycism-export-tab-content,
.hycism-copy-tab-content {
    display: none;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    animation: fadeIn 0.3s ease;
}

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

.hycism-export-tab-content.active,
.hycism-copy-tab-content.active {
    display: block;
}

.hycism-export-tab-content h4 {
    margin: 0 0 20px 0;
    color: #343a40;
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 2px solid #007cba;
    display: inline-block;
}

/* ===== PROFESSIONAL INLINE FORM LAYOUT ===== */
.hycism-export-form-inline {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.hycism-form-field {
    flex: 1;
    min-width: 0;
}

.hycism-form-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hycism-form-field input,
.hycism-form-field select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    font-weight: 500;
    color: #212529;
    transition: all 0.2s ease;
}

.hycism-form-field input:focus,
.hycism-form-field select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.15);
    background: #ffffff;
}

.hycism-form-field select {
    cursor: pointer;
}

/* ===== ACTION BUTTONS INLINE ===== */
.hycism-action-buttons-inline {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 10px;
    border: 2px solid #90caf9;
}

.hycism-action-buttons-inline .hycism-btn-sm {
    margin: 0;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

/* ===== WHATSAPP BUTTONS INLINE ===== */
.hycism-whatsapp-buttons-inline {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    padding: 14px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-radius: 10px;
    border: 2px solid #c3e6cb;
    margin-bottom: 16px;
}

.hycism-button-group-label {
    font-size: 14px;
    font-weight: 700;
    color: #155724;
    margin-right: 6px;
}

.hycism-whatsapp-buttons-inline .hycism-btn-whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    border: none;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    transition: all 0.2s ease;
}

.hycism-whatsapp-buttons-inline .hycism-btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

/* ===== ENHANCED COPY SCHEDULE FUNCTIONALITY ===== */
.hycism-copy-day-frontend-controls {
    display: flex;
    flex-direction: row;
    gap: 24px;
    align-items: flex-start;
}

.hycism-copy-next-day-option,
.hycism-copy-date-range-option {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    flex: 1;
    min-width: 0;
}

.hycism-copy-next-day-option h5,
.hycism-copy-date-range-option h5 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 8px;
    text-align: center;
}

.hycism-copy-date-range-option {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #90caf9;
}

.hycism-copy-date-range-option h5 {
    color: #1976d2;
    border-color: #90caf9;
}

/* Date Range Form Styling */
.hycism-copy-dates-inline {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.hycism-date-field {
    flex: 1;
    min-width: 140px;
}

.hycism-date-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hycism-date-field input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    font-weight: 500;
    color: #212529;
    transition: all 0.2s ease;
}

.hycism-date-field input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.15);
}

.hycism-copy-action {
    flex-shrink: 0;
}

.hycism-copy-action button {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.hycism-copy-options {
    margin-top: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.hycism-copy-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #495057;
    cursor: pointer;
}

.hycism-copy-options input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* OLD STYLES FOR BACKWARD COMPATIBILITY */
.hycism-export-controls,
.hycism-copy-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
    margin-bottom: 20px;
}

.hycism-export-controls label,
.hycism-copy-controls label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hycism-export-controls input,
.hycism-export-controls select,
.hycism-copy-controls input,
.hycism-copy-controls select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    transition: all 0.3s ease;
}

.hycism-export-controls input:focus,
.hycism-export-controls select:focus,
.hycism-copy-controls input:focus,
.hycism-copy-controls select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.hycism-quick-export {
    margin: 20px 0;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

.hycism-quick-export::before {
    content: '⚡ Quick Export:';
    width: 100%;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.hycism-whatsapp-share {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-radius: 12px;
    border: 1px solid #c3e6cb;
    position: relative;
}

.hycism-whatsapp-share::before {
    content: '💬';
    position: absolute;
    top: -12px;
    left: 20px;
    background: #fff;
    padding: 4px 8px;
    border-radius: 50%;
    border: 1px solid #c3e6cb;
}

.hycism-whatsapp-share h4 {
    margin: 0 0 16px 0;
    color: #155724;
    font-size: 16px;
    font-weight: 600;
}

.hycism-whatsapp-share .hycism-btn-whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    border: none;
    margin-right: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.hycism-whatsapp-share .hycism-btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.hycism-export-features {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid #90caf9;
    position: relative;
}

.hycism-export-features::before {
    content: '📊';
    position: absolute;
    top: -12px;
    left: 20px;
    background: #fff;
    padding: 4px 8px;
    border-radius: 50%;
    border: 1px solid #90caf9;
}

.hycism-export-features h5 {
    margin: 0 0 12px 0;
    color: #0d47a1;
    font-size: 16px;
    font-weight: 600;
}

.hycism-export-features ul {
    margin: 0;
    padding-left: 24px;
    font-size: 14px;
    color: #1565c0;
}

.hycism-export-features li {
    margin-bottom: 4px;
}

/* Improved Export Button Styling */
.hycism-btn-export {
    background: linear-gradient(135deg, #007cba 0%, #005a8b 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hycism-btn-export:hover {
    background: linear-gradient(135deg, #005a8b 0%, #007cba 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 124, 186, 0.4);
}

.hycism-copy-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.hycism-copy-date-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.hycism-copy-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    margin-top: var(--space-4);
}

.hycism-copy-help {
    margin-top: var(--space-4);
    padding: var(--space-4);
    background: var(--warning-light);
    border-radius: var(--border-radius);
}

.hycism-copy-help h5 {
    margin: 0 0 var(--space-2) 0;
    color: var(--gray-800);
    font-size: var(--font-size-sm);
}

.hycism-copy-help ul {
    margin: 0;
    padding-left: var(--space-5);
    font-size: var(--font-size-xs);
    color: var(--gray-600);
}

/* =============================================================================
   SCHEDULE DISPLAY
   ============================================================================= */
.hycism-schedule-display {
    background: white;
    border: var(--border-width) solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.hycism-schedule-display h3 {
    padding: var(--space-6);
    margin: 0;
    background: var(--gray-50);
    border-bottom: var(--border-width) solid var(--gray-200);
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--gray-900);
}

.hycism-schedule-table-wrapper {
    overflow-x: auto;
}

.hycism-schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
    border: 2px solid var(--gray-300);
}

.hycism-schedule-table th,
.hycism-schedule-table td {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    border-bottom: 2px solid var(--gray-200);
    border-right: 1px solid var(--gray-200);
}

/* Enhanced row borders for better visual separation */
.hycism-schedule-table tbody tr {
    border-bottom: 2px solid var(--gray-300);
}

.hycism-schedule-table tbody tr:last-child {
    border-bottom: 2px solid var(--gray-400);
}

/* Header row styling */
.hycism-schedule-table thead tr {
    border-bottom: 3px solid var(--primary-color);
}

/* Alternating row colors for better readability */
.hycism-schedule-table tbody tr:nth-child(even) {
    background-color: var(--gray-50);
}

.hycism-schedule-table tbody tr:nth-child(odd) {
    background-color: white;
}

/* Hover effect for table rows */
.hycism-schedule-table tbody tr:hover {
    background-color: var(--primary-light);
    transition: background-color 0.2s ease;
}

.hycism-schedule-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-900);
    position: sticky;
    top: 0;
    z-index: 10;
}

.hycism-schedule-table .time-column {
    width: 120px;
    font-weight: 500;
    background: var(--primary-light);
    color: var(--primary-color);
    border-right: 3px solid var(--primary-color);
}

.hycism-schedule-table .time-slot {
    font-weight: 500;
    color: var(--gray-800);
    background: var(--gray-50);
    border-right: 3px solid var(--primary-color);
}

.hycism-schedule-table .schedule-cell {
    vertical-align: top;
    min-height: 80px;
    position: relative;
}

.schedule-item {
    background: white;
    border: var(--border-width) solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: var(--space-3);
    min-height: 60px;
    position: relative;
    transition: var(--transition);
}

.schedule-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.schedule-item .teacher-name {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-1);
}

.schedule-item .batch-name {
    margin-bottom: var(--space-2);
}

.batch-badge {
    display: inline-block;
    padding: var(--space-1) var(--space-2);
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: var(--font-size-xs);
    font-weight: 500;
    border-radius: calc(var(--border-radius) / 2);
}

.schedule-item .subject {
    margin-bottom: var(--space-2);
    padding-left: var(--space-2);
}

.subject-name {
    font-weight: 500;
    font-size: var(--font-size-sm);
}

.subject-code {
    font-size: var(--font-size-xs);
    color: var(--gray-600);
}

.subject-category {
    font-size: var(--font-size-xs);
    color: var(--gray-500);
    margin-top: var(--space-1);
}

.schedule-actions {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

.schedule-item .notes {
    font-size: var(--font-size-xs);
    color: var(--gray-600);
    margin-top: var(--space-2);
    padding: var(--space-2);
    background: var(--gray-50);
    border-radius: calc(var(--border-radius) / 2);
}

.empty-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    color: var(--gray-400);
    font-size: var(--font-size-sm);
}

/* =============================================================================
   MODAL STYLES - ENHANCED CENTERING
   ============================================================================= */
.hycism-modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: auto;
    /* Flexbox centering */
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

/* When modal is shown */
.hycism-modal.hycism-modal-show {
    display: flex !important;
}

.hycism-modal-content {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    margin: auto;
    /* Enhanced centering animation */
    animation: modalSlideIn 0.3s ease-out;
    /* Ensure it's centered even with small content */
    min-height: auto;
}

.hycism-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-6);
    border-bottom: var(--border-width) solid var(--gray-200);
}

.hycism-modal-header h3 {
    margin: 0;
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--gray-900);
}

.hycism-modal-close {
    background: none;
    border: none;
    font-size: var(--font-size-xl);
    color: var(--gray-400);
    cursor: pointer;
    padding: var(--space-2);
    transition: var(--transition-colors);
}

.hycism-modal-close:hover {
    color: var(--gray-600);
}

/* Modal Animation */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Enhanced Modal Close Button */
.hycism-modal-close {
    background: none;
    border: none;
    font-size: var(--font-size-xl);
    color: var(--gray-400);
    cursor: pointer;
    padding: var(--space-2);
    transition: var(--transition-colors);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hycism-modal-close:hover {
    color: var(--gray-600);
    background-color: var(--gray-100);
}

.hycism-modal-body {
    padding: var(--space-6);
}

/* Prevent body scroll when modal is open */
.hycism-modal-open {
    overflow: hidden;
}

/* Enhanced batch selection container styling */
.hycism-frontend-batch-selection-container {
    background-color: var(--gray-50);
    padding: var(--space-4);
    border-radius: var(--border-radius);
    border: var(--border-width) solid var(--gray-200);
    margin-top: var(--space-2);
}

.hycism-frontend-batch-selection-mode {
    margin-bottom: var(--space-3) !important;
}

.hycism-frontend-batch-selection-mode label {
    font-weight: normal !important;
    cursor: pointer;
    margin-bottom: 0 !important;
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}

.hycism-frontend-batch-selection-mode input[type="radio"] {
    margin-right: var(--space-1) !important;
    margin-bottom: 0;
}

.frontend-batch-selection-method,
.edit-batch-selection-method {
    margin-top: var(--space-3);
}

/* Form actions styling */
.hycism-form-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: flex-end;
    margin-top: var(--space-6);
    padding-top: var(--space-4);
    border-top: var(--border-width) solid var(--gray-200);
}

/* Enhanced form description */
.hycism-form-description {
    font-style: italic;
    color: var(--gray-500);
    font-size: var(--font-size-xs);
    margin-top: var(--space-2);
}

.hycism-form-group {
    margin-bottom: var(--space-4);
}

.hycism-form-group label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: var(--space-2);
}

.hycism-form-group input,
.hycism-form-group select,
.hycism-form-group textarea {
    width: 100%;
    padding: var(--space-3);
    border: var(--border-width) solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    background: white;
    transition: var(--transition-colors);
}

.hycism-form-group input:focus,
.hycism-form-group select:focus,
.hycism-form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.hycism-form-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: flex-end;
    margin-top: var(--space-6);
    padding-top: var(--space-4);
    border-top: var(--border-width) solid var(--gray-200);
}

.hycism-frontend-batch-selection-container {
    border: var(--border-width) solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: var(--space-4);
    background: var(--gray-50);
}

/* Responsive Export Options */
@media (max-width: 768px) {
    .hycism-export-options-direct {
        padding: 16px;
        margin: 16px 0;
    }
    
    .hycism-export-tabs {
        flex-direction: column;
        gap: 4px;
        border-radius: 12px;
        padding: 4px;
    }
    
    .hycism-tab-button {
        padding: 10px 16px;
        border-radius: 8px;
        font-size: 13px;
    }
    
    .hycism-export-controls {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .hycism-quick-export {
        flex-direction: column;
        gap: 8px;
    }
    
    .hycism-quick-export .hycism-btn {
        width: 100%;
        text-align: center;
    }
}

/* Small Button Styling Improvements */
.hycism-btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.hycism-btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}

.hycism-btn-secondary:hover {
    background: linear-gradient(135deg, #495057 0%, #6c757d 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.hycism-frontend-batch-selection-mode {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.hycism-frontend-batch-selection-mode label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    font-weight: normal;
    margin-bottom: 0;
}

.hycism-form-description {
    font-size: var(--font-size-xs);
    color: var(--gray-600);
    margin-top: var(--space-2);
}

/* =============================================================================
   PREVIEW PANELS AND RESULTS
   ============================================================================= */
.hycism-frontend-preview-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin: var(--space-4) 0;
}

.hycism-frontend-preview-panel {
    border: var(--border-width) solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: var(--space-4);
    background: white;
}

.hycism-frontend-preview-panel h5 {
    margin: 0 0 var(--space-3) 0;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--gray-800);
}

.hycism-frontend-results-panel {
    border: var(--border-width) solid var(--success-color);
    border-radius: var(--border-radius);
    padding: var(--space-4);
    background: var(--success-light);
    margin: var(--space-4) 0;
}

.hycism-frontend-results-panel h5 {
    margin: 0 0 var(--space-3) 0;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--success-color);
}

/* =============================================================================
   TEACHER AND BATCH SCHEDULE VIEWS
   ============================================================================= */
.hycism-teacher-schedule,
.hycism-batch-schedule {
    background: white;
    border: var(--border-width) solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: var(--space-6);
    margin-top: var(--space-6);
}

.hycism-teacher-schedule h3,
.hycism-batch-schedule h3 {
    margin: 0 0 var(--space-4) 0;
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--gray-900);
}

/* =============================================================================
   DEBUG INFORMATION
   ============================================================================= */
.hycism-debug-info {
    background: var(--gray-100);
    border: var(--border-width) solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: var(--space-4);
    margin: var(--space-6) 0;
    font-family: 'Courier New', monospace;
    font-size: var(--font-size-xs);
}

.hycism-debug-info h4 {
    margin: 0 0 var(--space-3) 0;
    font-size: var(--font-size-sm);
    color: var(--gray-800);
}

.hycism-debug-info p {
    margin: var(--space-1) 0;
    color: var(--gray-700);
}

.hycism-debug-info button {
    margin: var(--space-2) var(--space-2) 0 0;
    padding: var(--space-2) var(--space-3);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: var(--font-size-xs);
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */
@media (max-width: 768px) {
    .hycism-frontend-container {
        padding: var(--space-4);
    }
    
    .hycism-main-filters-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hycism-filter-group {
        min-width: auto;
    }
    
    .hycism-filter-actions {
        justify-content: stretch;
    }
    
    .hycism-filter-actions .hycism-btn {
        flex: 1;
    }
    
    /* NEW RESPONSIVE STYLES FOR INLINE LAYOUT */
    .hycism-export-form-inline {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    
    .hycism-action-buttons-inline {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
    }
    
    .hycism-action-buttons-inline .hycism-btn-sm {
        width: 100%;
        text-align: center;
    }
    
    .hycism-whatsapp-buttons-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
    }
    
    .hycism-whatsapp-buttons-inline .hycism-btn-whatsapp {
        width: 100%;
        text-align: center;
    }
    
    .hycism-button-group-label {
        width: 100%;
        margin-bottom: 8px;
        text-align: center;
        font-size: 15px;
    }
    
    /* NEW RESPONSIVE STYLES FOR COPY FUNCTIONALITY */
    .hycism-copy-day-frontend-controls {
        flex-direction: column;
        gap: 16px;
    }
    
    .hycism-copy-next-day-option,
    .hycism-copy-date-range-option {
        flex: none;
    }
    
    .hycism-copy-dates-inline {
        flex-direction: column;
        gap: 12px;
    }
    
    .hycism-date-field {
        min-width: auto;
    }
    
    .hycism-copy-action button {
        width: 100%;
        padding: 12px;
    }
    
    /* OLD STYLES */
    .hycism-export-controls,
    .hycism-copy-controls {
        grid-template-columns: 1fr;
    }
    
    .hycism-copy-dates {
        grid-template-columns: 1fr;
    }
    
    .hycism-frontend-preview-container {
        grid-template-columns: 1fr;
    }
    
    .hycism-schedule-table th,
    .hycism-schedule-table td {
        padding: var(--space-2);
    }
    
    .hycism-modal {
        padding: var(--space-2);
        /* Ensure proper centering on mobile */
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .hycism-modal-content {
        max-height: 95vh;
        width: 95%;
        margin: 0 auto;
    }
    
    .hycism-modal-header,
    .hycism-modal-body {
        padding: var(--space-4);
    }
    
    .hycism-form-actions {
        flex-direction: column-reverse;
        gap: var(--space-2);
    }
    
    .hycism-form-actions .hycism-btn-sm {
        width: 100%;
        padding: var(--space-3) var(--space-4);
    }
}

@media (max-width: 480px) {
    .hycism-schedule-header h2 {
        font-size: var(--font-size-2xl);
    }
    
    /* ENHANCED MOBILE STYLES FOR INLINE LAYOUT */
    .hycism-form-field label {
        font-size: 11px;
        margin-bottom: 4px;
    }
    
    .hycism-form-field input,
    .hycism-form-field select {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .hycism-action-buttons-inline .hycism-btn-sm {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .hycism-whatsapp-buttons-inline .hycism-btn-whatsapp {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .hycism-button-group-label {
        font-size: 13px;
    }
    
    /* OLD STYLES */
    .hycism-export-tabs,
    .hycism-copy-tabs {
        flex-direction: column;
    }
    
    .hycism-quick-export {
        flex-direction: column;
    }
    
    .hycism-quick-export .hycism-btn {
        width: 100%;
    }
    
    .hycism-copy-actions {
        flex-direction: column;
    }
    
    .hycism-form-actions {
        flex-direction: column;
    }
}

/* =============================================================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================================================= */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for better accessibility */
.hycism-btn:focus,
.hycism-tab-button:focus,
.hycism-toggle-advanced:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --gray-200: #000000;
        --gray-300: #000000;
        --primary-color: #0000ff;
        --primary-hover: #0000cc;
    }
}