/* Enhanced Theme Preview Styles for MojŽivljenjepis.si */

/* Mini CV Preview Base Styles */
.theme-preview {
    position: relative;
    width: 100%;
    height: 120px;
    background: white;
    border-radius: 6px;
    padding: 8px;
    overflow: hidden;
    font-size: 8px;
    line-height: 1.2;
}

/* Professional Blue Theme */
.theme-preview-professional-blue .mini-header {
    height: 12px;
    background: linear-gradient(135deg, #4a90e2, #357abd);
    border-radius: 3px 3px 0 0;
    margin: -8px -8px 4px -8px;
}

.theme-preview-professional-blue .mini-name {
    font-weight: 600;
    color: #4a90e2;
    font-size: 9px;
    margin-bottom: 2px;
    font-family: 'Segoe UI', sans-serif;
}

.theme-preview-professional-blue .mini-title {
    color: #6c757d;
    font-size: 7px;
    margin-bottom: 4px;
}

.theme-preview-professional-blue .mini-section-title {
    height: 2px;
    background: #4a90e2;
    margin: 4px 0 2px 0;
    border-radius: 1px;
    width: 40%;
}

.theme-preview-professional-blue .mini-line {
    height: 1px;
    background: #dee2e6;
    margin: 1px 0;
    border-radius: 0.5px;
}

.theme-preview-professional-blue .mini-line.short {
    width: 70%;
}

/* Corporate Navy Theme */
.theme-preview-corporate-navy .mini-header-solid {
    height: 16px;
    background: #5a6c7d;
    margin: -8px -8px 4px -8px;
}

.theme-preview-corporate-navy .mini-name.serif {
    font-weight: 300;
    color: #5a6c7d;
    font-size: 9px;
    margin-bottom: 2px;
    font-family: Georgia, serif;
    letter-spacing: 0.3px;
}

.theme-preview-corporate-navy .mini-section-title-corp {
    height: 3px;
    background: #5a6c7d;
    margin: 4px 0 2px 0;
    width: 35%;
}

.theme-preview-corporate-navy .mini-line-corp {
    height: 1px;
    background: #495057;
    margin: 1px 0;
    width: 100%;
}

.theme-preview-corporate-navy .mini-line-corp.short {
    width: 60%;
}

/* Healthcare Green Theme */
.theme-preview-healthcare-green .mini-header-clean {
    height: 8px;
    background: #52b788;
    margin: -8px -8px 6px -8px;
    border-radius: 0;
}

.theme-preview-healthcare-green .mini-name.clean {
    font-weight: 500;
    color: #52b788;
    font-size: 9px;
    margin-bottom: 2px;
    font-family: 'Segoe UI', sans-serif;
}

.theme-preview-healthcare-green .mini-title.clean {
    color: #495057;
    font-size: 7px;
    margin-bottom: 6px;
}

.theme-preview-healthcare-green .mini-section-title-clean {
    height: 2px;
    background: #52b788;
    margin: 4px 0 2px 0;
    border-radius: 1px;
    width: 45%;
}

.theme-preview-healthcare-green .mini-line-clean {
    height: 1px;
    background: #e9ecef;
    margin: 2px 0;
    border-radius: 0.5px;
}

.theme-preview-healthcare-green .mini-line-clean.short {
    width: 75%;
}

/* Tech Purple Theme */
.theme-preview-tech-purple .mini-header-tech {
    height: 10px;
    background: linear-gradient(45deg, #8e7cc3, #7b68b0);
    margin: -8px -8px 4px -8px;
    clip-path: polygon(0 0, 100% 0, 90% 100%, 0% 100%);
}

.theme-preview-tech-purple .mini-name.mono {
    font-weight: 600;
    color: #8e7cc3;
    font-size: 8px;
    margin-bottom: 2px;
    font-family: 'SF Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.theme-preview-tech-purple .mini-title.tech {
    color: #6c757d;
    font-size: 7px;
    margin-bottom: 4px;
    font-family: monospace;
}

.theme-preview-tech-purple .mini-section-title-tech {
    height: 2px;
    background: #8e7cc3;
    margin: 4px 0 2px 0;
    width: 38%;
    transform: skew(-10deg);
}

.theme-preview-tech-purple .mini-line-tech {
    height: 1px;
    background: #dee2e6;
    margin: 1px 0;
    transform: skew(-2deg);
}

.theme-preview-tech-purple .mini-line-tech.short {
    width: 65%;
}

/* Visual Canva-Style Theme Previews */

/* Professional Modern Theme */
.theme-preview-professional .visual-header-split {
    display: flex;
    height: 20px;
    margin: -8px -8px 4px -8px;
}

.theme-preview-professional .visual-left {
    width: 30%;
    background: linear-gradient(135deg, #4a90e2, #357abd);
}

.theme-preview-professional .visual-right {
    flex: 1;
    background: #f8f9fa;
    padding: 2px 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.theme-preview-professional .visual-name {
    font-size: 8px;
    font-weight: 700;
    color: #4a90e2;
    margin-bottom: 1px;
}

.theme-preview-professional .visual-role {
    font-size: 6px;
    color: #6c757d;
}

.theme-preview-professional .visual-content {
    padding: 2px 0;
}

.theme-preview-professional .visual-section-modern {
    height: 2px;
    width: 50%;
    background: linear-gradient(90deg, #4a90e2, #6bb6d6);
    margin-bottom: 3px;
    border-radius: 1px;
}

.theme-preview-professional .visual-line {
    height: 1px;
    background: #dee2e6;
    margin: 1px 0;
    border-radius: 0.5px;
}

.theme-preview-professional .visual-line.short {
    width: 75%;
}

/* Creative Visual Theme */
.theme-preview-creative .creative-header {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}

.theme-preview-creative .creative-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle, #e67e44, #d96928);
    flex-shrink: 0;
}

.theme-preview-creative .creative-info {
    flex: 1;
}

.theme-preview-creative .creative-name {
    font-size: 8px;
    font-weight: 600;
    color: #e67e44;
    font-style: italic;
    margin-bottom: 1px;
}

.theme-preview-creative .creative-title {
    font-size: 6px;
    color: #6c757d;
}

.theme-preview-creative .creative-section-wave {
    height: 3px;
    background: linear-gradient(45deg, #e67e44, #d96928, #e67e44);
    background-size: 200% 100%;
    animation: wave 2s ease-in-out infinite;
    border-radius: 1.5px;
    margin-bottom: 3px;
    width: 60%;
}

@keyframes wave {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.theme-preview-creative .creative-line {
    height: 1px;
    background: #e9ecef;
    margin: 1px 0;
    border-radius: 2px;
}

.theme-preview-creative .creative-line.short {
    width: 70%;
}

/* Infographic Style Theme */
.theme-preview-infographic .infographic-timeline {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
}

.theme-preview-infographic .timeline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6bb6d6;
    position: relative;
    flex-shrink: 0;
}

.theme-preview-infographic .timeline-dot::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 3px;
    width: 2px;
    height: 15px;
    background: #6bb6d6;
}

.theme-preview-infographic .infographic-name {
    font-size: 8px;
    font-weight: 600;
    color: #6bb6d6;
    margin-bottom: 1px;
}

.theme-preview-infographic .infographic-role {
    font-size: 6px;
    color: #6c757d;
}

.theme-preview-infographic .infographic-stats {
    margin-top: 4px;
}

.theme-preview-infographic .stat-bar {
    height: 2px;
    background: linear-gradient(90deg, #6bb6d6, #5a9fc2);
    margin: 2px 0;
    border-radius: 1px;
    width: 80%;
}

.theme-preview-infographic .stat-bar.medium {
    width: 60%;
}

.theme-preview-infographic .stat-bar.short {
    width: 40%;
}

/* Magazine Layout Theme */
.theme-preview-magazine .magazine-header {
    text-align: center;
    margin-bottom: 4px;
    padding-bottom: 2px;
    border-bottom: 1px solid #dee2e6;
}

.theme-preview-magazine .magazine-title {
    font-size: 9px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 1px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.theme-preview-magazine .magazine-subtitle {
    font-size: 6px;
    color: #6c757d;
    font-style: italic;
}

.theme-preview-magazine .magazine-columns {
    display: flex;
    gap: 2px;
    margin-top: 3px;
}

.theme-preview-magazine .magazine-col {
    flex: 1;
}

.theme-preview-magazine .magazine-col:first-child {
    flex: 2;
}

.theme-preview-magazine .magazine-section {
    height: 2px;
    background: #495057;
    margin-bottom: 2px;
    width: 100%;
}

.theme-preview-magazine .magazine-line {
    height: 1px;
    background: #dee2e6;
    margin: 1px 0;
}

.theme-preview-magazine .magazine-line.short {
    width: 80%;
}

.theme-preview-magazine .magazine-block {
    width: 100%;
    height: 12px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 2px;
}

.theme-carousel-wrapper {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.theme-carousel-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0066CC, #27AE60, #8E44AD, #E67E22, #34495E);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Carousel Header */
.carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #dee2e6;
}

.carousel-title {
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
}

.carousel-title i {
    color: #0066CC;
}

.carousel-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.carousel-btn {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
}

.carousel-btn:hover {
    border-color: #0066CC;
    color: #0066CC;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
}

.carousel-btn:active {
    transform: translateY(0);
}

.carousel-counter {
    background: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    min-width: 80px;
    text-align: center;
}

/* Main Carousel Area */
.carousel-main {
    margin-bottom: 20px;
}

/* Mobile optimization: Show fewer themes per screen */
@media (max-width: 768px) {
    .theme-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 16px;
    }
    
    .theme-preview {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.theme-preview-container {
    transition: opacity 0.3s ease;
    margin-bottom: 20px;
}

.theme-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

/* Theme Information Panel */
.theme-info {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.theme-header {
    margin-bottom: 20px;
}

.theme-name {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.theme-description {
    margin: 0;
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Color Palette Display */
.color-palette {
    display: flex;
    gap: 16px;
    margin: 20px 0;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.color-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.color-swatch:hover {
    transform: scale(1.1);
}

.color-label {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
}

/* Theme Tags */
.theme-tags-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.preview-tag {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid currentColor;
}

.theme-best-for {
    margin: 20px 0;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--bs-primary);
}

.theme-best-for ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.theme-best-for li {
    margin: 4px 0;
    color: #495057;
}

.select-theme-btn {
    width: 100%;
    padding: 12px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
}

.select-theme-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* CV Preview Mock */
.cv-preview-mock {
    position: relative;
}

.cv-preview-paper {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease;
}

.cv-preview-paper:hover {
    transform: translateY(-4px) scale(1.02);
}

.cv-header {
    padding: 20px;
    text-align: center;
}

.cv-name {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.cv-title {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.cv-detail {
    font-size: 0.8rem;
    margin: 2px 0;
    opacity: 0.8;
}

.cv-body {
    padding: 16px;
}

.cv-section {
    margin-bottom: 16px;
}

.section-header {
    font-size: 0.85rem;
    margin-bottom: 8px;
    padding-bottom: 4px;
    font-weight: 600;
}

.cv-item {
    font-size: 0.75rem;
    line-height: 1.4;
}

/* Theme Dots Navigation */
.theme-dots-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
}

.theme-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.theme-dot:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.theme-dot.active {
    transform: scale(1.3);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.3);
}

/* Grid Toggle */
.theme-grid-toggle {
    text-align: center;
    margin: 20px 0;
}

/* Theme Grid Layout */
.theme-grid-container {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px dashed #dee2e6;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.theme-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.theme-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: #0066CC;
}

.theme-card.selected {
    border-color: #0066CC;
    background: linear-gradient(135deg, #f8f9ff 0%, #e3f2fd 100%);
}

.theme-card-header {
    height: 60px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-color-palette {
    display: flex;
    gap: 8px;
}

.color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.theme-card-body {
    padding: 16px;
}

.theme-card-title {
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c3e50;
}

.theme-card-description {
    margin: 0 0 12px 0;
    font-size: 0.8rem;
    color: #6c757d;
    line-height: 1.4;
}

.theme-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.theme-tag {
    background: #f8f9fa;
    color: #6c757d;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    border: 1px solid #e9ecef;
}

/* Selection Toast */
.theme-selection-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border: 1px solid #d4edda;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.theme-selection-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    color: #155724;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .theme-carousel-wrapper {
        padding: 16px;
        margin: 16px 0;
    }
    
    .carousel-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .theme-preview {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cv-preview-mock {
        order: -1;
    }
    
    .color-palette {
        justify-content: center;
    }
    
    .theme-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .carousel-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .theme-dots-container {
        flex-wrap: wrap;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .theme-carousel-wrapper {
        padding: 12px;
    }
    
    .carousel-title {
        font-size: 1.2rem;
    }
    
    .carousel-btn {
        width: 36px;
        height: 36px;
    }
    
    .theme-info {
        padding: 16px;
    }
    
    .color-palette {
        gap: 12px;
    }
    
    .color-swatch {
        width: 32px;
        height: 32px;
    }
}

/* Accessibility */
.carousel-btn:focus,
.theme-dot:focus,
.theme-card:focus,
.select-theme-btn:focus {
    outline: 2px solid #0066CC;
    outline-offset: 2px;
}

/* Animation for theme transitions */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.theme-preview-container > .theme-preview {
    animation: fadeInUp 0.5s ease;
}

/* Loading state */
.theme-carousel-wrapper.loading {
    opacity: 0.7;
    pointer-events: none;
}

.theme-carousel-wrapper.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0066CC;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}