/* ===== INNOVATIVE PLACEMENTS - THEME TOGGLE ===== */
/* Sun/Moon toggle button for light/dark theme switching */

/* ========================================
   THEME TOGGLE BUTTON
   ======================================== */

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius-md);
    cursor: pointer;
    color: var(--ip-text-muted);
    font-size: 1.1rem;
    transition: all var(--ip-transition-base);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.theme-toggle:hover {
    color: var(--ip-text-primary);
    border-color: var(--ip-border-hover);
    background: var(--ip-bg-card);
}

.theme-toggle:active {
    transform: scale(0.92);
}

/* Icon container */
.theme-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

/* Sun icon (shown in dark mode) */
.theme-toggle .icon-sun {
    display: none;
}

/* Moon icon (shown in light mode) */
.theme-toggle .icon-moon {
    display: flex;
}

/* Dark theme: show sun, hide moon */
[data-theme="dark"] .theme-toggle .icon-sun {
    display: flex;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

/* Hover animation */
.theme-toggle:hover .theme-toggle-icon {
    transform: rotate(15deg);
}

[data-theme="dark"] .theme-toggle:hover .theme-toggle-icon {
    transform: rotate(-15deg);
}

/* ========================================
   MOBILE THEME TOGGLE
   ======================================== */

.theme-toggle-mobile {
    display: flex;
    align-items: center;
    gap: var(--ip-space-3);
    width: 100%;
    padding: var(--ip-space-3) var(--ip-space-4);
    background: transparent;
    border: none;
    border-top: 1px solid var(--ip-border);
    margin-top: var(--ip-space-2);
    padding-top: var(--ip-space-4);
    cursor: pointer;
    color: var(--ip-text-muted);
    font-family: var(--ip-font-primary);
    font-size: var(--ip-text-sm);
    font-weight: var(--ip-font-medium);
    border-radius: var(--ip-radius-md);
    transition: all var(--ip-transition-fast);
}

.theme-toggle-mobile:hover {
    color: var(--ip-text-primary);
    background: var(--ip-mobile-link-hover);
}

.theme-toggle-mobile i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* Mobile: show appropriate text */
.theme-toggle-mobile .toggle-label-light {
    display: inline;
}

.theme-toggle-mobile .toggle-label-dark {
    display: none;
}

[data-theme="dark"] .theme-toggle-mobile .toggle-label-light {
    display: none;
}

[data-theme="dark"] .theme-toggle-mobile .toggle-label-dark {
    display: inline;
}

/* ========================================
   DESKTOP NAV ALIGNMENT
   ======================================== */

.nav-desktop .theme-toggle {
    margin-left: var(--ip-space-2);
}
