/*
Theme Name: scdev-theme-deluxe
Theme URI: https://scdev.local
Description: A flexible layout theme with Box, Wide, and Full layout options
Version: 1.0.0
Author: scdev
Author URI: https://scdev.local
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: scdev-theme-deluxe
Domain Path: /languages
*/

:root {
    --header-height: 60px;
    --footer-height: 60px;
    --header-footer-margin: 0px;
    --sidebar-width: 300px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
}

.theme-wrapper {
    display: flex;
    flex-direction: column;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* Header */
.theme-header {
    height: var(--header-height, 60px);
    background-color: #2c3e50;
    color: white;
    display: flex;
    align-items: center;
    padding: 0 20px;
    position: fixed !important;
    top: var(--header-footer-margin, 0px) !important;
    z-index: 999 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}

.header-left {
    width: 25%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 10px;
}

.header-center {
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
}

.header-center h1 {
    font-size: 24px;
    margin: 0;
}

.header-right {
    width: 25%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 10px;
}

/* Logo styling */
.header-logo {
    max-width: 140px !important;
    max-height: 70px !important;
    width: auto !important;
    height: auto !important;
    object-fit: cover !important;
    display: block;
    padding: 5px !important;
}

/* Social buttons styling */
.social-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.social-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 14px;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s, transform 0.2s;
    color: inherit;
}

.social-button svg {
    width: 18px;
    height: 18px;
}

.social-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* Navigation menu styling */
nav ul,
.menu {
    display: flex !important;
    gap: 4px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center !important;
    flex-wrap: wrap !important;
}

nav li,
.menu li {
    margin: 0 !important;
    padding: 0 !important;
    display: inline-block !important;
}

nav a,
.menu a {
    display: inline-block !important;
    color: white !important;
    text-decoration: none !important;
    padding: 4px 8px !important;
    line-height: 1.0 !important;
    transition: background-color 0.3s !important;
}

nav a:hover,
.menu a:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Main Content Area */
.theme-main {
    display: flex;
    gap: 10px;
    padding: 10px;
    justify-content: center;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    flex-wrap: wrap !important;
    margin-top: var(--header-height, 60px) !important;
    margin-bottom: var(--footer-height, 60px) !important;
    height: auto !important;
    flex-shrink: 0 !important;
}

/* Sidebars */
.theme-sidebar {
    width: var(--sidebar-width, 300px) !important;
    max-width: var(--sidebar-width, 300px) !important;
    background-color: #ecf0f1;
    padding: 20px;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    flex-shrink: 0 !important;
    height: calc(100vh - var(--header-height, 60px) - var(--footer-height, 60px) - 20px) !important;
}

.theme-sidebar-left {
    order: 1;
}

.theme-sidebar-right {
    order: 3;
}

.sidebar-content h2 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.sidebar-content p {
    color: #7f8c8d;
    font-size: 14px;
}

/* Content Area - Default Box Layout */
.theme-content {
    width: 550px !important;
    max-width: 550px !important;
    background-color: white;
    padding: 20px;
    order: 2;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    height: calc(100vh - var(--header-height, 60px) - var(--footer-height, 60px) - 20px) !important;
}

.content-inner h2 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #2c3e50;
}

.content-inner p {
    color: #555;
    line-height: 1.6;
}

/* Layout Variants */

/* Wide Layout: 680px content */
.layout-wide .theme-content {
    width: 680px !important;
    max-width: 680px !important;
}

/* Full Layout: 800px content, 100% width */
.layout-full .theme-content {
    width: 800px !important;
    max-width: 800px !important;
}

/* Footer */
.theme-footer {
    height: var(--footer-height, 60px);
    background-color: #2c3e50;
    color: white;
    display: flex;
    align-items: center;
    padding: 0 20px;
    position: fixed !important;
    bottom: var(--header-footer-margin, 0px) !important;
    z-index: 999 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}

.footer-content {
    width: 100%;
    font-size: 14px;
    line-height: 1.0;
    padding: 4px 8px;
}

.footer-content p {
    margin: 0;
    font-size: 14px;
}

/* Footer sections */
.footer-left {
    width: 25%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 10px;
}

.footer-center {
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
}

.footer-center h3 {
    font-size: 14px;
    margin: 0;
}

.footer-right {
    width: 25%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 10px;
}

/* Responsive adjustments */
@media (max-width: 1420px) {
    .theme-main {
        flex-wrap: wrap !important;
    }
}

/* Toggle Buttons - Base Styles */
.toggle-left-sidebar,
.toggle-right-sidebar,
.toggle-header,
.toggle-footer,
.toggle-left-extra,
.toggle-right-extra,
.toggle-left-blue {
    position: fixed;
    width: 40px;
    height: 40px;
    background-color: transparent;
    color: #3498db;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    z-index: 1001 !important;
}

/* Toggle Button Positions */
.toggle-left-sidebar {
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.toggle-right-sidebar {
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.toggle-header {
    left: 50%;
    top: 75px;
    transform: translateX(-50%);
}

.toggle-footer {
    left: 50%;
    bottom: 75px;
    transform: translateX(-50%);
}

.toggle-left-extra {
    left: 5px;
    top: calc(50% + 50px);
    transform: translateY(-50%);
}

.toggle-right-extra {
    right: 5px;
    top: calc(50% + 50px);
    transform: translateY(-50%);
}

.toggle-left-blue {
    left: 5px;
    top: calc(50% + 100px);
    transform: translateY(-50%);
}

/* Toggle Button Hover */
.toggle-left-sidebar:hover,
.toggle-right-sidebar:hover,
.toggle-header:hover,
.toggle-footer:hover,
.toggle-left-extra:hover,
.toggle-right-extra:hover,
.toggle-left-blue:hover {
    background-color: rgba(236, 240, 241, 0.5);
}

/* Toggle Button Tooltips */
.toggle-left-sidebar::after {
    content: 'Left Sidebar';
    position: absolute;
    left: 50px;
    background-color: #2c3e50;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.toggle-left-sidebar:hover::after {
    opacity: 1;
}

.toggle-right-sidebar::after {
    content: 'Right Sidebar';
    position: absolute;
    right: 50px;
    background-color: #2c3e50;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.toggle-right-sidebar:hover::after {
    opacity: 1;
}

.toggle-header::after {
    content: 'Header';
    position: absolute;
    top: 50px;
    background-color: #2c3e50;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.toggle-header:hover::after {
    opacity: 1;
}

.toggle-footer::after {
    content: 'Footer';
    position: absolute;
    bottom: 50px;
    background-color: #2c3e50;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.toggle-footer:hover::after {
    opacity: 1;
}

.toggle-left-extra::after {
    content: 'Header';
    position: absolute;
    left: 50px;
    background-color: #2c3e50;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.toggle-left-extra:hover::after {
    opacity: 1;
}

.toggle-right-extra::after {
    content: 'Footer';
    position: absolute;
    right: 50px;
    background-color: #2c3e50;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.toggle-right-extra:hover::after {
    opacity: 1;
}

.toggle-left-blue::after {
    content: 'All';
    position: absolute;
    left: 50px;
    background-color: #2c3e50;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.toggle-left-blue:hover::after {
    opacity: 1;
}

/* Header/Footer Width Classes */
.theme-header.header-width-1190,
.theme-footer.footer-width-1190 {
    width: 1190px !important;
}

.theme-header.header-width-1320,
.theme-footer.footer-width-1320 {
    width: 1320px !important;
}

.theme-header.header-width-full,
.theme-footer.footer-width-full {
    width: 100% !important;
    left: 0 !important;
    transform: none !important;
}


/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: background-color 0.3s, transform 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.scroll-to-top.show {
    display: flex;
}

.scroll-to-top:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
}

/* Night Mode Toggle Button */
.night-mode-toggle {
    position: fixed;
    right: 5px;
    top: 40px;
    width: 40px;
    height: 40px;
    background-color: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.3s;
    z-index: 1000;
}

.night-mode-toggle:hover {
    transform: scale(1.2);
}

/* Night Mode Styles */
body.night-mode {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
}

body.night-mode .theme-header,
body.night-mode .theme-footer {
    background-color: #0d0d0d !important;
    color: #e0e0e0 !important;
}

body.night-mode .theme-sidebar {
    background-color: #2a2a2a !important;
    color: #e0e0e0 !important;
}

body.night-mode .theme-content {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
}

body.night-mode a {
    color: #64b5f6 !important;
}

body.night-mode h1,
body.night-mode h2,
body.night-mode h3,
body.night-mode h4,
body.night-mode h5,
body.night-mode h6 {
    color: #e0e0e0 !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Hide toggle buttons on mobile */
    .toggle-left-sidebar,
    .toggle-right-sidebar,
    .toggle-header,
    .toggle-footer,
    .toggle-left-extra,
    .toggle-right-extra,
    .toggle-left-blue {
        display: none !important;
    }

    /* Make content responsive */
    .theme-content {
        width: 100% !important;
        max-width: 100% !important;
        order: 2 !important;
    }

    .layout-wide .theme-content {
        width: 100% !important;
        max-width: 100% !important;
    }

    .layout-full .theme-content {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Stack layout on mobile */
    .theme-main {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
    }

    /* Sidebars responsive */
    .theme-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
        position: static !important;
        overflow-y: visible !important;
    }

    .theme-sidebar-left {
        order: 1 !important;
    }

    .theme-sidebar-right {
        order: 3 !important;
    }

    /* Mobile Layout Order Options */
    /* Content Only */
    .mobile-layout-content-only .theme-sidebar {
        display: none !important;
    }

    /* Content | Left */
    .mobile-layout-content-left .theme-content {
        order: 1 !important;
    }
    .mobile-layout-content-left .theme-sidebar-left {
        order: 2 !important;
    }
    .mobile-layout-content-left .theme-sidebar-right {
        display: none !important;
    }

    /* Content | Right */
    .mobile-layout-content-right .theme-content {
        order: 1 !important;
    }
    .mobile-layout-content-right .theme-sidebar-right {
        order: 2 !important;
    }
    .mobile-layout-content-right .theme-sidebar-left {
        display: none !important;
    }

    /* Left | Content */
    .mobile-layout-left-content .theme-sidebar-left {
        order: 1 !important;
    }
    .mobile-layout-left-content .theme-content {
        order: 2 !important;
    }
    .mobile-layout-left-content .theme-sidebar-right {
        display: none !important;
    }

    /* Right | Content */
    .mobile-layout-right-content .theme-sidebar-right {
        order: 1 !important;
    }
    .mobile-layout-right-content .theme-content {
        order: 2 !important;
    }
    .mobile-layout-right-content .theme-sidebar-left {
        display: none !important;
    }

    /* Content | Left | Right */
    .mobile-layout-content-left-right .theme-content {
        order: 1 !important;
    }
    .mobile-layout-content-left-right .theme-sidebar-left {
        order: 2 !important;
    }
    .mobile-layout-content-left-right .theme-sidebar-right {
        order: 3 !important;
    }

    /* Left | Content | Right (default) */
    .mobile-layout-left-content-right .theme-sidebar-left {
        order: 1 !important;
    }
    .mobile-layout-left-content-right .theme-content {
        order: 2 !important;
    }
    .mobile-layout-left-content-right .theme-sidebar-right {
        order: 3 !important;
    }

    /* Left | Right | Content */
    .mobile-layout-left-right-content .theme-sidebar-left {
        order: 1 !important;
    }
    .mobile-layout-left-right-content .theme-sidebar-right {
        order: 2 !important;
    }
    .mobile-layout-left-right-content .theme-content {
        order: 3 !important;
    }

    /* Adjust header/footer for mobile */
    .theme-header,
    .theme-footer {
        padding: 0 10px !important;
    }

    .header-left,
    .header-center,
    .header-right,
    .footer-left,
    .footer-center,
    .footer-right {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Adjust scroll to top button */
    .scroll-to-top {
        bottom: 20px !important;
        right: 20px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
    }

    /* Adjust night mode button */
    .night-mode-toggle {
        right: 50px !important;
    }
}


/* User Profile Header Item */
.user-profile-header-item {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.user-profile-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #3498db;
    background-color: transparent;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, border-color 0.3s;
}

.user-profile-toggle:hover {
    transform: scale(1.1);
    border-color: #2980b9;
}

.user-profile-toggle img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.user-profile-menu {
    position: absolute;
    top: 50px;
    right: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    display: none;
    z-index: 1001;
    overflow: hidden;
}

.user-profile-menu.show {
    display: block;
}

.user-profile-header {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #333;
}

.user-profile-buttons {
    display: flex;
    flex-direction: column;
}

.user-profile-btn {
    padding: 10px 16px;
    text-decoration: none;
    color: #333;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    transition: background-color 0.2s;
    border-bottom: 1px solid #eee;
}

.user-profile-btn:last-child {
    border-bottom: none;
}

.user-profile-btn:hover {
    background-color: #f5f5f5;
}

.user-profile-btn.logout {
    color: #e74c3c;
}

.user-profile-btn.logout:hover {
    background-color: #ffe6e6;
}

.user-profile-login-btn {
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s;
    display: inline-block;
}

.user-profile-login-btn:hover {
    background-color: #2980b9;
}

/* Night mode styles for user profile */
body.night-mode .user-profile-menu {
    background-color: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

body.night-mode .user-profile-header {
    border-bottom-color: #444;
    color: #e0e0e0;
}

body.night-mode .user-profile-btn {
    color: #e0e0e0;
    border-bottom-color: #444;
}

body.night-mode .user-profile-btn:hover {
    background-color: #3a3a3a;
}

body.night-mode .user-profile-btn.logout {
    color: #ff6b6b;
}

body.night-mode .user-profile-btn.logout:hover {
    background-color: #4a2a2a;
}

body.night-mode .user-profile-login-btn {
    background-color: #2980b9;
}

body.night-mode .user-profile-login-btn:hover {
    background-color: #1e5fa0;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .user-profile-tab {
        right: 60px;
    }

    .user-profile-menu {
        min-width: 180px;
    }

    .user-profile-login {
        right: 60px;
    }

    .user-profile-header-item {
        gap: 5px;
    }

    .user-profile-login-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}
