/**
 * BIBLE VERSIONS MANAGER STYLES
 * Styling for the Bible versions manager modal and cards
 */

/* ========== VERSIONS MANAGER MODAL ========== */

.bible-versions-manager {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
}

.versions-manager-content {
    background: white;
    width: 100%;
    max-width: 600px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Floating Header for Versions Manager */
.versions-floating-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 12px 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1001;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    user-select: none;
}

.versions-floating-header .back-btn {
    display: inline-block;
    padding: 8px 12px;
    background: transparent;
    color: #1a1a1a;
    border: none;
    cursor: pointer;
    font-size: 1.3em;
    line-height: 1;
    transition: all 0.2s;
}

.versions-floating-header .back-btn:hover {
    color: #2563eb;
}

.versions-floating-header h1 {
    margin: 0;
    font-size: 1em;
    color: #1a1a1a;
    font-weight: 600;
    white-space: nowrap;
}

.versions-floating-header .header-spacer {
    display: none;
}

.versions-manager-body {
    padding: 100px 20px 20px 20px;
    overflow-y: auto;
    flex: 1;
}

/* ========== VERSION SELECTOR DROPDOWN ========== */

.version-selector-section {
    background: #f9fafb;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 2px solid #e5e7eb;
}

.version-selector-label {
    display: block;
    font-size: 0.85em;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.version-dropdown {
    width: 100%;
    padding: 14px 16px;
    font-size: 1.05em;
    font-weight: 500;
    color: #1a1a1a;
    background: white;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%231a1a1a' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.version-dropdown:hover {
    border-color: #2563eb;
}

.version-dropdown:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.version-selector-hint {
    margin: 10px 0 0 0;
    font-size: 0.85em;
    color: #6b7280;
    line-height: 1.4;
}

/* ========== VERSION SECTIONS ========== */

.version-section {
    margin-bottom: 30px;
}

.version-section:last-child {
    margin-bottom: 0;
}

.version-section h3 {
    margin: 0 0 12px 0;
    font-size: 1.1em;
    color: #1a1a1a;
    font-weight: 600;
}

.section-description {
    margin: 0 0 20px 0;
    color: #6b7280;
    font-size: 0.9em;
    line-height: 1.5;
}

.empty-state {
    color: #9ca3af;
    font-style: italic;
    text-align: center;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}

/* ========== VERSION CARDS ========== */

.version-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.version-card:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.version-card:last-child {
    margin-bottom: 0;
}

.version-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.version-card .version-icon {
    font-size: 2em;
    flex-shrink: 0;
}

.version-card .version-info {
    flex: 1;
}

.version-card .version-name {
    font-size: 1em;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.version-card .version-meta {
    font-size: 0.85em;
    color: #6b7280;
    margin-bottom: 4px;
}

.version-card .version-description {
    font-size: 0.85em;
    color: #6b7280;
    line-height: 1.4;
    margin-top: 8px;
}

.version-card .version-feature {
    display: inline-block;
    font-size: 0.75em;
    color: #10b981;
    background: #d1fae5;
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 4px;
    font-weight: 500;
}

/* ========== VERSION CARD ACTIONS ========== */

.version-card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.version-size {
    font-size: 0.85em;
    color: #6b7280;
    margin-right: auto;
}

.btn-version-action {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-switch {
    background: #2563eb;
    color: white;
}

.btn-switch:hover {
    background: #1d4ed8;
}

.btn-delete {
    background: #ef4444;
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
}

.btn-download {
    background: #10b981;
    color: white;
}

.btn-download:hover {
    background: #059669;
}

/* ========== DOWNLOAD PROGRESS ========== */

.download-progress-container {
    flex: 1;
}

.download-progress-text {
    font-size: 0.85em;
    color: #6b7280;
    margin-bottom: 6px;
}

.download-progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.download-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    transition: width 0.3s ease;
}

/* ========== INFO SECTION ========== */

.version-info-section {
    background: #f9fafb;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
}

.info-text {
    margin: 0;
    font-size: 0.9em;
    color: #4b5563;
    line-height: 1.6;
}

.info-text strong {
    color: #1a1a1a;
}

/* ========== DARK MODE ========== */

body.night-mode .versions-manager-content {
    background: #1a1a1a;
}

body.night-mode .versions-floating-header {
    background: rgba(26, 26, 26, 0.98);
}

body.night-mode .versions-floating-header h1 {
    color: #f3f4f6;
}

body.night-mode .versions-floating-header .back-btn {
    background: transparent;
    color: #f3f4f6;
}

body.night-mode .versions-floating-header .back-btn:hover {
    color: #60a5fa;
}

body.night-mode .version-selector-section {
    background: #111827;
    border-color: #374151;
}

body.night-mode .version-selector-label {
    color: #9ca3af;
}

body.night-mode .version-dropdown {
    background: #1a1a1a;
    color: #f3f4f6;
    border-color: #374151;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23f3f4f6' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
}

body.night-mode .version-dropdown:hover {
    border-color: #60a5fa;
}

body.night-mode .version-dropdown:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

body.night-mode #customMemoryBody {
    background: #1a1a1a;
    color: #f3f4f6;
    border-color: #374151;
}

body.night-mode #customMemoryBody:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

body.night-mode .version-selector-hint {
    color: #9ca3af;
}

body.night-mode .version-section h3 {
    color: #f3f4f6;
}

body.night-mode .section-description {
    color: #9ca3af;
}

body.night-mode .empty-state {
    background: #111827;
    color: #6b7280;
}

body.night-mode .version-card {
    background: #111827;
    border-color: #374151;
}

body.night-mode .version-card:hover {
    border-color: #2563eb;
}

body.night-mode .version-card .version-name {
    color: #f3f4f6;
}

body.night-mode .version-card .version-meta,
body.night-mode .version-card .version-description {
    color: #9ca3af;
}

body.night-mode .version-size {
    color: #9ca3af;
}

body.night-mode .version-info-section {
    background: #111827;
    border-left-color: #2563eb;
}

body.night-mode .info-text {
    color: #9ca3af;
}

body.night-mode .info-text strong {
    color: #f3f4f6;
}

body.night-mode .download-progress-text {
    color: #9ca3af;
}

body.night-mode .download-progress-bar {
    background: #374151;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 600px) {
    .bible-versions-manager {
        padding: 0;
    }

    .versions-manager-content {
        max-width: 100%;
        height: 100vh;
    }

    .version-card-actions {
        flex-wrap: wrap;
    }

    .version-size {
        width: 100%;
        margin-bottom: 8px;
    }

    .btn-version-action {
        flex: 1;
    }
}
