/* === Theme Toggle Button === */
.theme-toggle {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--card-bg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

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

.theme-toggle svg {
    width: 24px;
    height: 24px;
    stroke: var(--text-dark);
    stroke-width: 2;
    fill: none;
    transition: stroke 0.3s ease;
}

/* Sun icon (shown in dark mode) */
.theme-toggle .sun-icon {
    display: none;
}

/* Moon icon (shown in light mode) */
.theme-toggle .moon-icon {
    display: block;
}

/* Show/hide icons based on theme */
[data-theme="dark"] .theme-toggle .sun-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: none;
}

/* System preference detection for icons */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .sun-icon {
        display: block;
    }
    
    :root:not([data-theme="light"]) .theme-toggle .moon-icon {
        display: none;
    }
} 

/* === Language Toggle Button === */
.language-toggle {
    position: absolute;
    top: 20px;
    /* Position next to theme-toggle. theme-toggle is 40px wide + 20px left offset = 60px. Add some spacing. */
    right: 20px; /* Changed from left to right */
    z-index: 1000;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    width: 40px; /* Same width as theme-toggle */
    height: 40px; /* Same height as theme-toggle */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--card-bg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
    font-family: var(--font-family-sans-serif); /* Ensure consistent font */
    font-weight: bold;
    font-size: 1em; /* Adjust as needed */
    color: var(--text-dark); /* Use theme-aware text color */
}

.language-toggle:hover {
    transform: scale(1.1);
}

.language-toggle .lang-text {
    line-height: 1; /* Ensure text is centered vertically */
}

/* Ensure text color changes with theme */
[data-theme="dark"] .language-toggle {
    color: var(--text-light); 
}

/* Adjust position for smaller screens if necessary */
@media (max-width: 768px) { 
    .theme-toggle {
        top: 15px;
        left: 15px;
    }
    .language-toggle {
        top: 15px;
        /* left: 65px; */ /* Adjust based on new theme-toggle position */
        right: 15px; /* Changed from left to right */
    }
} 