/* ============================================
   THEME SETTINGS PAGE
   ============================================ */

.theme-settings-page {
    max-width: 1000px;
    margin: 0 auto;
}

.page-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.page-header h1 {
    color: var(--primary-dark);
    margin-bottom: var(--spacing-sm);
}

.page-description {
    color: var(--text-light);
    font-size: 1.1rem;
}

.theme-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.theme-section {
    background: var(--card-bg);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.theme-section h2 {
    color: var(--primary-dark);
    margin-bottom: var(--spacing-sm);
}

.section-description {
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
}

/* Theme Grid */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100px, 100%), 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.theme-card {
    position: relative;
    background: var(--bg-color);
    border: 3px solid transparent;
    border-radius: var(--radius);
    padding: var(--spacing-xs);
    cursor: pointer;
    transition: all var(--transition);
}

.theme-card:hover {
    border-color: color-mix(in srgb, var(--primary-color) 50%, transparent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.theme-card.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary-color) 15%, transparent);
}

.theme-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Theme Visual */
.theme-visual {
    position: relative;
    height: 120px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
}

/* Theme Patterns */
.theme-visual[data-theme="ocean"] .theme-pattern {
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 20 Q10 10, 20 20 T40 20' stroke='%234A90A4' stroke-width='2' fill='none'/%3E%3Cpath d='M0 30 Q10 20, 20 30 T40 30' stroke='%234A90A4' stroke-width='2' fill='none' opacity='0.5'/%3E%3C/svg%3E");
    background-size: 40px 40px;
}

.theme-visual[data-theme="sunset"] .theme-pattern {
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='20' fill='%23F5A623' opacity='0.2'/%3E%3Ccircle cx='30' cy='30' r='12' fill='%23F5A623' opacity='0.3'/%3E%3C/svg%3E");
    background-size: 60px 60px;
}

.theme-visual[data-theme="forest"] .theme-pattern {
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='20,8 26,20 14,20' fill='%2334A853' opacity='0.25'/%3E%3Cpolygon points='20,14 24,22 16,22' fill='%2334A853' opacity='0.3'/%3E%3C/svg%3E");
    background-size: 40px 40px;
}

.theme-visual[data-theme="lavender"] .theme-pattern {
    background: url("data:image/svg+xml,%3Csvg width='50' height='50' xmlns='http://www.w3.org/2000/svg'%3E%3Cellipse cx='25' cy='25' rx='15' ry='10' fill='%23B39DDB' opacity='0.2'/%3E%3Cellipse cx='25' cy='25' rx='10' ry='15' fill='%23B39DDB' opacity='0.15'/%3E%3C/svg%3E");
    background-size: 50px 50px;
}

.theme-visual[data-theme="cherry"] .theme-pattern {
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='15' cy='15' r='10' fill='%23E91E63' opacity='0.25'/%3E%3Ccircle cx='25' cy='25' r='8' fill='%23E91E63' opacity='0.2'/%3E%3C/svg%3E");
    background-size: 40px 40px;
}

.theme-pattern {
    position: absolute;
    inset: 0;
}

.theme-colors {
    position: absolute;
    bottom: var(--spacing-xs);
    right: var(--spacing-xs);
    display: flex;
    gap: var(--spacing-xs);
}

.color-dot {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    border: 3px solid white;
    box-shadow: var(--shadow);
}

/* Theme Info */
.theme-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.theme-description {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Checkmark */
.theme-checkmark {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    opacity: 0;
    transform: scale(0);
    transition: all var(--transition);
}

.theme-card.selected .theme-checkmark {
    opacity: 1;
    transform: scale(1);
}

/* Color Pickers */
.color-picker-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
}

@media (min-width: 60px) {
    .color-picker-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.color-picker-group {
    display: flex;
    min-width: 50px;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.color-picker-group label {
    display: flex;
    flex-direction: column;
}

.color-label-text {
    font-weight: 600;
    color: var(--text-color);
}

.color-label-desc {
    font-size: 0.85rem;
    color: var(--text-light);
}

.color-input-wrapper {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.color-input {
    width: 80px;
    height: 60px;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.color-input:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.color-hex {
    flex: 1;
    min-width: 50px;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    font-weight: 600;
    text-align: center;
    background: var(--bg-color);
}

/* Preview Section */
.theme-preview-section {
    background: var(--card-bg);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-top: var(--spacing-lg);
}

.theme-preview-section h2 {
    color: var(--primary-dark);
    margin-bottom: var(--spacing-md);
}

.preview-elements {
    display: flex;
    justify-content: center;
}

.preview-card {
    background: var(--bg-color);
    padding: var(--spacing-lg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    max-width: 400px;
}

.preview-card h3 {
    color: var(--primary-dark);
    margin-bottom: var(--spacing-sm);
}

.preview-card p {
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
}

.preview-card .btn {
    margin: 0.25rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}