/*=============================================
    MediaPurple Color Switcher - Cyber Glassmorphism
    Violet #7C3AED + Neon Cyan #00F0FF
    For media-tech companies
===============================================*/

/*-- Trigger Button --*/
.tc-switcher-toggle {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #7C3AED 0%, #00F0FF 100%);
    border: none;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: -4px 0 20px rgba(124, 58, 237, 0.35);
    transition: all 0.3s ease;
}
.tc-switcher-toggle:hover {
    width: 56px;
    background: linear-gradient(135deg, #6D28D9 0%, #00C8E0 100%);
    box-shadow: -6px 0 25px rgba(124, 58, 237, 0.5);
}
.tc-switcher-toggle i {
    font-size: 22px;
    color: #fff;
    transition: transform 0.6s ease;
}
.tc-switcher-toggle:hover i {
    transform: rotate(90deg);
}

/*-- Panel --*/
.tc-switcher-panel {
    position: fixed;
    right: -320px;
    top: 0;
    width: 320px;
    height: 100vh;
    background: rgba(15, 10, 30, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 99998;
    overflow-y: auto;
    overflow-x: hidden;
    border-left: 2px solid rgba(0, 240, 255, 0.2);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.tc-switcher-panel.active {
    right: 0;
}
.tc-switcher-panel::-webkit-scrollbar {
    width: 5px;
}
.tc-switcher-panel::-webkit-scrollbar-track {
    background: transparent;
}
.tc-switcher-panel::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.3);
    border-radius: 3px;
}

/*-- Panel Header --*/
.tc-switcher-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.tc-switcher-header h3 {
    color: #00F0FF;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.tc-switcher-header h3 i {
    margin-right: 8px;
    font-size: 20px;
}
.tc-switcher-close {
    background: none;
    border: none;
    color: #9D8BB4;
    font-size: 22px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: color 0.3s ease;
}
.tc-switcher-close:hover {
    color: #00F0FF;
}

/*-- Section --*/
.tc-switcher-section {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.08);
}
.tc-switcher-section:last-child {
    border-bottom: none;
}
.tc-switcher-section h6 {
    color: #9D8BB4;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 15px 0;
}
.tc-switcher-section h6 span {
    color: #00F0FF;
    font-weight: 700;
}

/*-- Layout Toggle --*/
.tc-switcher-layout {
    display: flex;
    gap: 10px;
}
.tc-layout-btn {
    flex: 1;
    display: block;
    padding: 12px;
    text-align: center;
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 6px;
    color: #9D8BB4;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}
.tc-layout-btn:hover,
.tc-layout-btn.active {
    background: linear-gradient(135deg, #7C3AED 0%, #00F0FF 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

/*-- Color Grid --*/
.tc-switcher-colors {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}
.tc-switcher-colors li {
    list-style: none;
    margin: 0;
    padding: 0;
}
.tc-switcher-colors li a {
    display: block;
    width: 100%;
    height: 36px;
    border-radius: 6px;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}
.tc-switcher-colors li a::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.tc-switcher-colors li a:hover::after,
.tc-switcher-colors li a.active::after {
    border-color: #00F0FF;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

/* Color swatch values */
.tc-sw-1 { background: #86BC42; }
.tc-sw-2 { background: #41C3AC; }
.tc-sw-3 { background: #AF4D32; }
.tc-sw-4 { background: #f05a66; }
.tc-sw-5 { background: #3498db; }
.tc-sw-6 { background: #9b59b6; }
.tc-sw-7 { background: #34495E; }
.tc-sw-8 { background: #e67e22; }
.tc-sw-9 { background: #0073AD; }
.tc-sw-10 { background: #336E7B; }

/*-- Pattern Grid --*/
.tc-switcher-patterns {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}
.tc-switcher-patterns a {
    display: block;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid rgba(124, 58, 237, 0.15);
    transition: all 0.3s ease;
    position: relative;
}
.tc-switcher-patterns a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 6px;
    border: 2px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    pointer-events: none;
}
.tc-switcher-patterns a:hover::after,
.tc-switcher-patterns a.active::after {
    border-color: #00F0FF;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}
.tc-switcher-patterns a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/*-- Background Grid --*/
.tc-switcher-bg {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}
.tc-switcher-bg a {
    display: block;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid rgba(124, 58, 237, 0.15);
    transition: all 0.3s ease;
    position: relative;
}
.tc-switcher-bg a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 6px;
    border: 2px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    pointer-events: none;
}
.tc-switcher-bg a:hover::after,
.tc-switcher-bg a.active::after {
    border-color: #00F0FF;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}
.tc-switcher-bg a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/*-- Overlay --*/
.tc-switcher-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99997;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.tc-switcher-overlay.active {
    opacity: 1;
    visibility: visible;
}

/*-- Active indicator on toggle --*/
.tc-switcher-toggle.active {
    background: #00F0FF;
    box-shadow: -4px 0 20px rgba(0, 240, 255, 0.5);
}
.tc-switcher-toggle.active i {
    transform: rotate(45deg);
}

/*-- Responsive --*/
@media (max-width: 768px) {
    .tc-switcher-panel {
        width: 280px;
        right: -280px;
    }
    .tc-switcher-colors {
        grid-template-columns: repeat(5, 1fr);
        gap: 10px;
    }
    .tc-switcher-colors li a {
        height: 32px;
    }
    .tc-switcher-patterns,
    .tc-switcher-bg {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }
}
