/*
    EDS Upload - Styles
    Version: 1.0.2

    (c) Copyright 2025-2026 Ofni, LLC and David McElroy. All rights reserved.

    Change History:
    - v1.0.4 (2026-04-07 12:31 CDT): Added splash screen styles with background image
    - v1.0.2 (2026-04-07 11:48 CDT): Added reset button styling, folder-path hint style
    - v1.0.1 (2026-04-07 11:18 CDT): Initial release - splash overlay, wizard progress, upload dashboard styling matching eds-pwa
*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ── Splash Screen ── */

.splash-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: url('assets/imgs/splash.png') center center / cover no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    transition: opacity 0.8s ease-out;
}

.splash-screen.hidden {
    display: none;
}

.splash-center {
    text-align: center;
    color: white;
    background: rgba(0,0,0,0.3);
    padding: 40px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.splash-loading-bar {
    width: 300px;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    overflow: hidden;
}

.splash-loading-fill {
    width: 0%;
    height: 100%;
    background: white;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.splash-status {
    margin-top: 20px;
    font-size: 0.9em;
    opacity: 0.8;
    color: white;
}

/* ── Splash Overlay (Terms) ── */

.splash-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15000;
    backdrop-filter: blur(5px);
}

.splash-overlay.hidden {
    display: none;
}

.splash-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    overflow: hidden;
    animation: slideIn 0.8s ease-out;
}

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

.splash-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.splash-header::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.app-title {
    font-size: 2.5em;
    font-weight: bold;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.app-subtitle {
    font-size: 1.2em;
    opacity: 0.9;
    margin: 0;
}

.version-badge {
    position: absolute;
    top: 15px; right: 15px;
    background: rgba(255,255,255,0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    backdrop-filter: blur(10px);
}

.splash-body {
    padding: 40px 30px;
}

.app-description {
    font-size: 1.1em;
    line-height: 1.6;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.terms-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    margin: 25px 0;
}

.terms-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #495057;
    margin-bottom: 15px;
}

.terms-text {
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 20px;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 12px;
    margin-top: 4px;
    transform: scale(1.2);
}

.checkbox-label {
    color: #495057;
    line-height: 1.4;
    cursor: pointer;
}

.links-section {
    text-align: center;
    margin: 20px 0;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.link {
    color: #667eea;
    text-decoration: none;
    margin: 0 15px;
    font-size: 0.9em;
}

.link:hover {
    text-decoration: underline;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* ── Buttons ── */

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-primary:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-highlight {
    background: #28a745;
    color: white;
    width: 100%;
    padding: 14px;
    font-size: 1em;
    animation: pulse 2s infinite;
}

.btn-highlight:hover {
    background: #218838;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

/* ── App Container / Wizard ── */

.app-container {
    width: 90%;
    max-width: 600px;
}

.app-container.hidden {
    display: none;
}

.app-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.progress-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    text-align: center;
}

.progress-header h3 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
}

.progress-header p {
    margin: 0;
    opacity: 0.85;
    font-size: 0.9em;
    color: rgba(255,255,255,0.9);
}

.progress-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.progress-step {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 5px;
    transition: all 0.3s ease;
    font-size: 0.85em;
}

.progress-step.active {
    background: white;
    color: #667eea;
}

.progress-step.completed {
    background: #28a745;
    color: white;
}

.progress-line {
    width: 40px; height: 2px;
    background: rgba(255,255,255,0.3);
    margin: 0 5px;
}

.progress-line.completed {
    background: #28a745;
}

.step-content {
    padding: 30px;
}

.step {
    display: none;
}

.step.active {
    display: block;
    animation: fadeIn 0.3s;
}

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

.form-group {
    margin: 20px 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

input[type="email"]:focus {
    outline: none;
    border-color: #667eea;
}

.step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* ── Instruction card (folder step) ── */

.instruction-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 10px 0;
}

.instruction-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.step-badge {
    width: 24px; height: 24px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
    margin-top: 2px;
}

.hint {
    color: #6c757d;
    font-size: 0.9em;
    margin-top: 5px;
}

code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

.folder-status {
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.9em;
}

.folder-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.folder-path {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    font-family: sans-serif;
    border-left: 4px solid #667eea;
    margin: 15px 0 0;
    font-size: 13px;
    color: #495057;
}

/* ── Error ── */

.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 10px;
    border-radius: 6px;
    margin: 15px 0;
}

.hidden {
    display: none !important;
}

/* ── Upload step ── */

.user-info {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #555;
}

.file-list {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    max-height: 250px;
    overflow-y: auto;
    font-size: 13px;
    font-family: monospace;
    line-height: 1.8;
}

.file-item {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
}

.file-item.new { color: #28a745; }
.file-item.changed { color: #fd7e14; }
.file-item.unchanged { color: #999; }

.badge {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 3px;
    font-family: sans-serif;
}

.badge-new { background: #d4edda; color: #155724; }
.badge-changed { background: #fff3cd; color: #856404; }
.badge-unchanged { background: #e9ecef; color: #6c757d; }

.upload-progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.upload-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s;
}

.progress-text {
    font-size: 13px;
    color: #666;
    text-align: center;
    margin-bottom: 15px;
}

.last-upload-info {
    background: #e8f4fd;
    border: 1px solid #b3d9ff;
    border-radius: 6px;
    padding: 12px 15px;
    font-size: 13px;
    color: #0c5460;
    margin-top: 10px;
}

.reset-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.btn-reset {
    padding: 6px 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-reset:hover {
    background: #c82333;
}

/* ── Footer ── */

.footer {
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin-top: 20px;
    padding: 10px;
}
