/* Thurtea-Ai - Themes CSS */
/* Light/Dark Theme Variables and Theme-Specific Styles */

/* Dark theme (default) - Ensures dark theme is the fallback */
:root,
[data-theme="dark"],
body,
html {
    --bg-color: #1a202c;
    --card-bg: #2d3748;
    --text-primary: #e2e8f0;
    --text-secondary: #a0aec0;
    --border-color: #4a5568;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
}

/* Light theme */
[data-theme="light"] {
    --bg-color: #f7fafc;
    --card-bg: #ffffff;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.theme-toggle:hover {
    transform: scale(1.05);
}

.theme-toggle i {
    color: var(--text-primary);
    font-size: 1.2rem;
}

/* Light theme specific adjustments */
[data-theme="light"] .template-gallery {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border: 1px solid var(--border-color);
}

[data-theme="light"] .template-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

[data-theme="light"] .documentation {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border: 1px solid var(--border-color);
}

[data-theme="light"] .doc-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

/* Template Gallery Section - Styled to match theme */
.template-gallery {
    margin: 50px 0;
    padding: 40px 20px;
    background: rgba(45, 55, 72, 0.6);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.template-gallery h2 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 600;
}

.template-gallery h2 i {
    color: var(--primary-color);
    margin-right: 10px;
}

.template-gallery .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.template-card {
    background: rgba(45, 55, 72, 0.8);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 30px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.template-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
    background: rgba(45, 55, 72, 0.9);
}

.template-card h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.template-card h3 i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.template-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.template-card .features {
    list-style: none;
    margin-bottom: 20px;
}

.template-card .features li {
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.template-card .features li::before {
    content: "✓";
    color: var(--success-color);
    font-weight: bold;
}

.template-card .btn {
    margin-top: auto;
}

/* Tooltip styles */
[title] {
    position: relative;
}

[title]::before {
    content: attr(title);
    position: absolute;
    top: 100%;
    right: 0;
    padding: 5px 10px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 9999;
}

[title]:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Theme responsive adjustments */
@media (max-width: 768px) {    
    .template-gallery {
        margin: 30px 0;
        padding: 30px 15px;
    }
    
    .template-gallery .grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0;
    }
    
    .template-card {
        padding: 20px;
    }
    
    .template-gallery h2 {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }
}

@media (max-width: 480px) {
    .template-card {
        padding: 15px;
    }
}