/**
 * Bulk Training CSS
 * Styles for the bulk employee training enrollment system
 * Version: 1.0.0
 * Matches live.css design system
 */

/* ==========================================================================
   Base Styles & Variables (Matching Site Design)
   ========================================================================== */

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --success: #10b981;
    --success-dark: #059669;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --light-blue: #f0f7ff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
}

/* Base Resets */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
}

/* ==========================================================================
   Layout Components (Matching Site Design)
   ========================================================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* Intro Banner */
.intro-banner {
    background: linear-gradient(135deg, var(--light-blue) 0%, #e0f2fe 100%);
    padding: 60px 20px;
    margin-bottom: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    color: var(--gray-900);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.intro-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(0deg, var(--primary) 0px, var(--primary) 1px, transparent 1px, transparent 10px),
                      repeating-linear-gradient(90deg, var(--primary) 0px, var(--primary) 1px, transparent 1px, transparent 10px);
    opacity: 0.05;
    pointer-events: none;
}

.intro-banner h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    font-weight: 700;
    color: #1f2937;
    position: relative;
    z-index: 1;
}

.intro-banner > p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 30px;
    line-height: 1.8;
    color: var(--gray-700);
    position: relative;
    z-index: 1;
}

.intro-features {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 30px;
    position: relative;
    z-index: 1;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: var(--gray-700);
}

.feature-icon {
    font-size: 24px;
    color: var(--success);
}

/* Content Cards */
.content-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}


/* ==========================================================================
   How It Works Section
   ========================================================================== */

.how-it-works-section {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    border: 2px solid #10b981;
}

.how-it-works-header {
    text-align: center;
    margin-bottom: 30px;
}

.how-it-works-header h2 {
    color: #059669;
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.how-it-works-header p {
    color: #065f46;
    font-size: 1.1rem;
    margin: 0;
}

.how-it-works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.how-it-works-step {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.how-it-works-step:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.how-it-works-step .step-number {
    background: #10b981;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
}

.how-it-works-step h3 {
    color: #059669;
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

.how-it-works-step p {
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--gray-200);
}

.section-number {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.section-header h2 {
    color: var(--primary);
    font-size: 1.8rem;
    margin: 0;
}

/* ==========================================================================
   Form Styles
   ========================================================================== */

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-700);
}

.form-group label.required::after {
    content: " *";
    color: var(--error-red);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-light);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ==========================================================================
   Employee Entry Section
   ========================================================================== */

.employee-entry-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.tab-btn {
    flex: 1;
    padding: 15px 25px;
    border: 2px solid var(--gray-200);
    background: white;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-color: var(--primary);
}

.tab-btn:hover:not(.active) {
    background: var(--light-blue);
    border-color: var(--primary-light);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Employee Table */
.employee-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.employee-table th {
    background: var(--gray-50);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
}

.employee-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--gray-200);
}

.employee-table input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
}

.employee-table input:focus {
    outline: none;
    border-color: var(--primary-light);
}

.remove-row-btn {
    background: var(--danger-light);
    color: #b91c1c;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
    font-weight: 600;
}

.remove-row-btn:hover {
    background: #fecaca;
}

/* Employee Count */
.employee-count {
    background: var(--light-blue);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.employee-count strong {
    color: var(--primary);
    font-size: 1.1rem;
}

.employee-count.count-warning {
    background: var(--warning-light);
    border: 2px solid var(--warning);
}

.employee-count.count-warning strong {
    color: #92400e;
}

/* ==========================================================================
   CSV Upload Styles
   ========================================================================== */

.csv-upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    background: var(--gray-50);
}

.csv-upload-area:hover {
    border-color: var(--primary-light);
    background: var(--light-blue);
}

.csv-upload-area.dragover {
    border-color: var(--success);
    background: #ecfdf5;
}

.upload-icon {
    font-size: 48px;
    color: var(--gray-400);
    margin-bottom: 15px;
}

.csv-upload-area h3 {
    color: var(--gray-700);
    margin-bottom: 10px;
}

.csv-upload-area p {
    color: var(--gray-500);
    margin: 8px 0;
}

.sample-csv-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
}

.sample-csv-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Button Styles
   ========================================================================== */

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--success), var(--success-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--gray-200);
}

.btn-secondary:hover {
    background: var(--light-blue);
    border-color: var(--primary-light);
}

.add-rows-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

/* ==========================================================================
   Payment Section
   ========================================================================== */

.payment-info {
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f4ff 100%);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.payment-info h3 {
    color: var(--primary-blue);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.payment-info p {
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Amount Selection */
.amount-selection {
    display: flex;
    gap: 12px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.amount-btn {
    background: white;
    color: var(--gray-700);
    border: 2px solid var(--gray-300);
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
    min-width: 80px;
}

.amount-btn:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

.amount-btn.selected {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.amount-btn.selected:hover {
    background: #1e40af;
    border-color: #1e40af;
}

.custom-amount-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-amount-group input {
    width: 120px;
    padding: 12px;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 16px;
}

.custom-amount-group input:focus {
    outline: none;
    border-color: var(--primary-light);
}

.minimum-notice {
    background: var(--warning-yellow-light);
    padding: 12px 20px;
    border-radius: 8px;
    border-left: 4px solid var(--warning-yellow);
    margin-top: 15px;
}

.minimum-notice strong {
    color: #92400e;
}

.selected-amount {
    text-align: center;
    margin: 15px 0;
    padding: 10px;
    background: #eff6ff;
    border-radius: 6px;
    color: var(--primary);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Stripe Elements */
#stripe-card-element {
    background: white;
    padding: 15px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    margin: 20px 0;
}

/* ==========================================================================
   Submit Section
   ========================================================================== */

.submit-section {
    background: var(--gray-50);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 18px 50px;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.submit-btn:disabled {
    background: var(--gray-400);
    cursor: not-allowed;
    transform: none;
}

.terms-notice {
    margin-top: 20px;
    color: var(--gray-500);
    font-size: 14px;
}

.terms-notice a {
    color: var(--primary-light);
    text-decoration: none;
}

.terms-notice a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Error & Status Messages
   ========================================================================== */

.error-message {
    background: var(--danger-light);
    color: #b91c1c;
    padding: 15px;
    border: 1px solid #fecaca;
    border-radius: 6px;
    margin: 15px 0;
    font-weight: 500;
}

.error-message strong {
    display: block;
    margin-bottom: 10px;
}

.error-message ul {
    margin: 10px 0 0 20px;
    padding: 0;
}

.error-message li {
    margin: 5px 0;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .intro-banner h1 {
        font-size: 2rem;
    }
    
    .intro-banner > p {
        font-size: 1rem;
    }
    
    .intro-features {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .employee-entry-tabs {
        flex-direction: column;
    }
    
    .amount-selection {
        flex-direction: column;
    }
    
    .amount-btn {
        width: 100%;
    }
    
    .custom-amount-group {
        width: 100%;
    }
    
    .custom-amount-group input {
        flex: 1;
    }
    
    .content-card {
        padding: 25px 20px;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .employee-table {
        font-size: 14px;
    }
    
    .employee-table th,
    .employee-table td {
        padding: 8px;
    }
    
    .how-it-works-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .how-it-works-header h2 {
        font-size: 1.7rem;
    }
    
    .how-it-works-header p {
        font-size: 1rem;
    }
    
    .how-it-works-step {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .intro-banner {
        padding: 40px 15px;
    }
    
    .intro-banner h1 {
        font-size: 1.5rem;
    }
    
    .section-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.3rem;
    }
    
    .content-card {
        padding: 20px 15px;
    }
    
    .submit-btn {
        padding: 15px 30px;
        font-size: 16px;
    }
    
    .employee-table {
        font-size: 12px;
    }
    
    .employee-table input {
        padding: 6px 8px;
        font-size: 12px;
    
    .how-it-works-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .how-it-works-header h2 {
        font-size: 1.4rem;
    }
    
    .how-it-works-header p {
        font-size: 0.95rem;
    }
    
    .how-it-works-step {
        padding: 20px 15px;
    }
    
    .how-it-works-step .step-number {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .how-it-works-step h3 {
        font-size: 1.1rem;
    }
    }
}

/* ==========================================================================
   Employee Section Shake Animation
   ========================================================================== */

@keyframes sectionShake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

.section-shake {
    animation: sectionShake 0.6s ease-in-out;
    outline: 2px solid #f59e0b;
    outline-offset: 4px;
    border-radius: 12px;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .intro-banner,
    .section-header,
    .employee-entry-tabs,
    .tab-btn,
    .payment-info,
    .submit-section,
    .btn {
        display: none !important;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

/* Focus styles for keyboard navigation */
.btn:focus,
.amount-btn:focus,
.tab-btn:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}