/* Floating Toggle Button */
.wp-dark-mode-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #ffffff;
    border: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    outline: none;
}

.wp-dark-mode-toggle:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.wp-dark-mode-toggle:active {
    transform: translateY(-2px) scale(0.95);
}

.wp-dark-mode-toggle svg {
    width: 26px;
    height: 26px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.wp-dark-mode-toggle .sun-icon {
    position: absolute;
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
    color: #ffb800;
}

.wp-dark-mode-toggle .moon-icon {
    position: absolute;
    opacity: 1;
    transform: rotate(0) scale(1);
    color: #1e293b;
}

/* Dark Mode Transitions */
html, body {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: #0f172a !important;
    color: #f8fafc !important;
}

body.dark-mode .wp-dark-mode-toggle {
    background-color: #1e293b;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

body.dark-mode .wp-dark-mode-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

body.dark-mode .wp-dark-mode-toggle .moon-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

/* Comprehensive Coverage */
body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode h4, 
body.dark-mode h5, 
body.dark-mode h6,
body.dark-mode p,
body.dark-mode span,
body.dark-mode li,
body.dark-mode strong,
body.dark-mode em {
    color: #f1f5f9 !important;
}

body.dark-mode a {
    color: #38bdf8 !important;
}

body.dark-mode a:hover {
    color: #7dd3fc !important;
}

/* Container & Section Backgrounds */
body.dark-mode article,
body.dark-mode section,
body.dark-mode div.card,
body.dark-mode .widget,
body.dark-mode header,
body.dark-mode footer {
    background-color: transparent;
}

/* Form Fields */
body.dark-mode input:not([type="submit"]):not([type="button"]),
body.dark-mode textarea,
body.dark-mode select {
    background-color: #1e293b !important;
    color: #f8fafc !important;
    border: 1px solid #334155 !important;
    border-radius: 8px;
    padding: 10px;
}

body.dark-mode button,
body.dark-mode input[type="submit"],
body.dark-mode .button {
    background-color: #38bdf8 !important;
    color: #ffffff !important;
    border: none !important;
    transition: background-color 0.3s ease;
}

body.dark-mode button:hover,
body.dark-mode input[type="submit"]:hover {
    background-color: #0ea5e9 !important;
}

/* Image handling in dark mode */
body.dark-mode img {
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

body.dark-mode img:hover {
    opacity: 1;
}
