/**
 * Smart CV Builder - Template Gallery Styles
 */

.template-gallery-header {
    margin-bottom: 1.5rem;
}

.template-gallery-header h2 {
    margin-bottom: 0.5rem;
}

/* Filter Buttons */
.template-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-filter {
    padding: 0.5rem 1rem;
    border: 2px solid #e2e8f0;
    background: white;
    color: #718096;
    border-radius: 2rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-filter:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-filter.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Template Grid */
.template-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Template Card */
.template-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.template-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.template-card.selected {
    border-color: var(--primary-color);
    border-width: 3px;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.template-card-preview {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.template-card-icon {
    opacity: 0.8;
}

.template-selected-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.template-card-body {
    padding: 1rem;
}

.template-card-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.template-card-category {
    font-size: 0.7rem;
    text-transform: uppercase;
}

.template-card-desc {
    font-size: 0.75rem;
    color: #718096;
    margin-top: 0.5rem;
    margin-bottom: 0;
    line-height: 1.4;
}

/* Preview Container */
.template-preview-container {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: sticky;
    top: 80px;
}

.template-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f7fafc;
}

.template-preview-wrapper {
    padding: 1.5rem;
    background: #f1f5f9;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.template-preview-placeholder {
    text-align: center;
    padding: 3rem;
}

/* CV Template Preview */
.cv-template {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: scale(0.6);
    transform-origin: top center;
}

@media (max-width: 992px) {
    .template-preview-container {
        position: static;
        margin-top: 2rem;
    }

    .template-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 576px) {
    .template-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
