/* Custom theme styles for CHUNGTAY */

/* Header adjustments */
.header__nav a.active {
    color: #00C2FF;
}

/* Footer adjustments */
.footer__nav a:hover,
.footer__links a:hover {
    color: #00C2FF;
    transition: color 0.3s;
}

.footer__social a {
    transition: transform 0.3s, opacity 0.3s;
}

.footer__social a:hover {
    transform: translateY(-3px);
    opacity: 0.8;
}

/* Sidebar adjustments */
.sidebar__nav-link--active {
    color: #00C2FF;
}

.sidebar__nav-link {
    transition: color 0.3s ease, background-color 0.3s ease;
}

.sidebar__nav-link:hover {
    color: #00C2FF;
}

/* Sidebar responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.sidebar--active {
        transform: translateX(0);
    }
    
    .sidebar__logo {
        padding: 20px;
    }
    
    .sidebar__nav {
        padding: 20px 0;
    }
    
    .sidebar__nav-item {
        margin-bottom: 8px;
    }
    
    .sidebar__nav-link {
        padding: 12px 20px;
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .sidebar__nav-link svg {
        width: 20px;
        height: 20px;
    }
}

/* Theme switcher in header */
.header__action--theme .header__action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header__action--theme svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* User menu dropdown in header */
.header__action--user {
    position: relative;
}

.header__drop {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    min-width: 200px;
    padding: 8px 0;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.header__drop.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.header__action--user:hover .header__drop,
.header__action--user .header__drop.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.header__drop .header__all {
    display: block;
    padding: 8px 20px;
    color: #1A1A1A;
    text-decoration: none;
    transition: background-color 0.3s;
}

.header__drop .header__all:hover {
    background-color: #F9FAFF;
    color: #00C2FF;
}

/* Dark theme adjustments */
body.dark-theme .header__drop {
    background: #1A1A1A;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

body.dark-theme .header__drop .header__all {
    color: #FFFFFF;
}

body.dark-theme .header__drop .header__all:hover {
    background-color: #2A2A2A;
    color: #00C2FF;
}

/* Search form adjustments */
.header__search {
    display: none;
}

.header__search.active {
    display: flex;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .header__nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        padding: 20px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        z-index: 999;
        flex-direction: column;
        gap: 12px;
    }
    
    .header__nav.active {
        display: flex;
    }
    
    .header__nav a {
        padding: 12px;
        border-radius: 8px;
        transition: background-color 0.3s;
    }
    
    .header__nav a:hover,
    .header__nav a.active {
        background-color: rgba(0, 194, 255, 0.1);
    }
    
    body.dark-theme .header__nav {
        background: #1A1A1A;
    }
    
    .header__actions {
        gap: 8px;
    }
    
    .header__action-btn span {
        display: none;
    }
    
    .header__drop {
        right: 0;
        left: auto;
        min-width: 180px;
    }
    
    .footer__content {
        text-align: center;
    }
    
    .footer__social {
        justify-content: center;
        margin-bottom: 20px;
    }
}

/* Ensure OctoberCMS components work with template styles */
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

/* OctoberCMS AJAX loading indicator */
.ajax-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 20px 40px;
    border-radius: 8px;
    z-index: 9999;
    display: none;
}

.ajax-loading.show {
    display: block;
}

/* OctoberCMS form styles compatibility */
.form-control,
.form-select {
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    padding: 12px 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus,
.form-select:focus {
    border-color: #00C2FF;
    box-shadow: 0 0 0 3px rgba(0, 194, 255, 0.1);
    outline: none;
}

.btn {
    border-radius: 24px;
    padding: 10px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #7B42F6 0%, #00D9F5 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 194, 255, 0.3);
}

/* Dark theme form adjustments */
body.dark-theme .form-control,
body.dark-theme .form-select {
    background: #2A2A2A;
    border-color: #3A3A3A;
    color: #FFFFFF;
}

body.dark-theme .form-control:focus,
body.dark-theme .form-select:focus {
    border-color: #00C2FF;
    background: #2A2A2A;
}

/* Smooth transitions */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* Performance optimization - reduce transitions on low-end devices */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

