/**
 * Cookie Banner Styles - Cyberpunk Theme
 * Matches Pagisto's design system with purple/cyan accents
 */

/* CSS Variables - matching main.css */
:root {
    --bg-dark: #050508;
    --bg-card: #0f1015;
    --accent: #a645b5;
    --neon-cyan: #00f7ff;
    --text-main: #e0e0e0;
    --text-muted: #8892b0;
    --font-cyber: 'Orbitron', sans-serif;
    --font-mono: 'Roboto Mono', monospace;
}

#cookieBanner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(5, 5, 8, 0.98);
    border-top: 2px solid var(--accent);
    backdrop-filter: blur(15px);
    padding: 24px;
    box-shadow: 0 -5px 40px rgba(166, 69, 181, 0.4), 0 -1px 20px rgba(0, 247, 255, 0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Glowing top border effect */
#cookieBanner::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    box-shadow: 0 0 25px var(--neon-cyan), 0 0 10px var(--accent);
    animation: borderPulse 3s ease-in-out infinite;
}

@keyframes borderPulse {

    0%,
    100% {
        opacity: 1;
        width: 300px;
    }

    50% {
        opacity: 0.7;
        width: 400px;
    }
}

.cookie-banner-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.cookie-banner-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
}

.cookie-banner-icon {
    font-size: 2rem;
    color: var(--accent);
    text-shadow: 0 0 15px var(--accent);
    flex-shrink: 0;
}

.cookie-banner-text {
    flex: 1;
}

.cookie-banner-text h3 {
    font-family: var(--font-cyber);
    font-size: 1.1rem;
    color: white;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 0 10px rgba(166, 69, 181, 0.7), 0 0 20px rgba(166, 69, 181, 0.4);
    font-weight: 700;
}

.cookie-banner-text p {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.cookie-banner-text a {
    color: var(--neon-cyan);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.cookie-banner-text a:hover {
    color: var(--accent);
    text-shadow: 0 0 8px var(--accent);
}

.cookie-banner-actions {
    display: flex;
    gap: 15px;
    flex-shrink: 0;
}

/* Cookie Banner Buttons - Matching main.css button styles exactly */
.cookie-btn {
    display: inline-block;
    padding: 14px 28px;
    font-family: var(--font-cyber);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: none;
    white-space: nowrap;
    text-decoration: none;
}

.cookie-btn-accept {
    background: var(--accent);
    color: white;
    border: none;
    box-shadow: 0 0 20px rgba(166, 69, 181, 0.5);
}

.cookie-btn-accept:hover,
.cookie-btn-accept:active {
    background: var(--neon-cyan);
    box-shadow: 0 0 30px var(--neon-cyan), 0 0 10px white;
    color: var(--bg-dark);
}

.cookie-btn-accept:active {
    transform: scale(0.98);
}

.cookie-btn-decline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    box-shadow: inset 0 0 10px rgba(166, 69, 181, 0.2);
    padding: 12px 26px;
}

.cookie-btn-decline:hover,
.cookie-btn-decline:active {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 20px var(--accent);
}

.cookie-btn-decline:active {
    transform: scale(0.98);
}

.cookie-btn-ghost {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    box-shadow: inset 0 0 10px rgba(166, 69, 181, 0.2);
    padding: 12px 26px;
}

.cookie-btn-ghost:hover,
.cookie-btn-ghost:active {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 20px var(--accent);
}

.cookie-btn-ghost:active {
    transform: scale(0.98);
}

/* Terminal-style prefix for text */
.cookie-banner-text p::before {
    content: "> ";
    color: var(--accent);
    margin-right: 4px;
}

/* Settings Panel */
.cookie-settings-panel {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(166, 69, 181, 0.3);
    position: relative;
    animation: slideDown 0.3s ease-out;
}

.cookie-settings-panel::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, var(--neon-cyan), transparent);
    box-shadow: 0 0 10px var(--neon-cyan);
}

.cookie-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.cookie-category {
    background: rgba(15, 16, 21, 0.4);
    padding: 0;
    border: 1px solid rgba(136, 146, 176, 0.2);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
    transition: all 0.3s ease;
    position: relative;
}

.cookie-category::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(166, 69, 181, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

.cookie-category:hover::before {
    opacity: 1;
}

.cookie-category:hover {
    border-color: rgba(166, 69, 181, 0.5);
    box-shadow: inset 0 0 15px rgba(166, 69, 181, 0.1);
}

.cookie-category-label {
    display: block;
    cursor: pointer;
    width: 100%;
    position: relative;
    z-index: 1;
    padding: 12px;
}

.cookie-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-category-title {
    color: white;
    font-family: var(--font-cyber);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Cyberpunk-styled checkboxes with angular corners */
.cookie-category input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-muted);
    background: rgba(15, 16, 21, 0.6);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    clip-path: polygon(15% 0, 100% 0, 100% 85%, 85% 100%, 0 100%, 0 15%);
    box-shadow: inset 0 0 5px rgba(136, 146, 176, 0.2);
}

.cookie-category input[type="checkbox"]:hover {
    border-color: var(--accent);
    box-shadow: inset 0 0 10px rgba(166, 69, 181, 0.3), 0 0 5px rgba(166, 69, 181, 0.4);
}

.cookie-category input[type="checkbox"]:checked {
    background: rgba(0, 247, 255, 0.15);
    border-color: var(--neon-cyan);
    box-shadow: inset 0 0 10px rgba(0, 247, 255, 0.4), 0 0 15px rgba(0, 247, 255, 0.5);
}

.cookie-category input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: var(--neon-cyan);
    font-size: 16px;
    font-weight: bold;
    left: 2px;
    top: -3px;
    text-shadow: 0 0 8px var(--neon-cyan), 0 0 4px var(--neon-cyan);
    animation: checkGlow 0.3s ease-out;
}

.cookie-category input[type="checkbox"]:disabled {
    border-color: rgba(136, 146, 176, 0.4);
    background: rgba(255, 255, 255, 0.05);
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.05);
}

.cookie-category input[type="checkbox"]:disabled:checked {
    border-color: var(--text-muted);
    box-shadow: inset 0 0 5px rgba(136, 146, 176, 0.2);
}

.cookie-category input[type="checkbox"]:disabled:checked::after {
    color: var(--text-muted);
    text-shadow: none;
}

@keyframes checkGlow {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.cookie-category-desc {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
    margin-left: 28px;
    /* Align with text, past checkbox */
    line-height: 1.4;
    position: relative;
    padding-left: 12px;
}

.cookie-category-desc::before {
    content: '//';
    position: absolute;
    left: -8px;
    color: rgba(166, 69, 181, 0.5);
    font-weight: bold;
}

.cookie-settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    align-items: center;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    #cookieBanner {
        padding: 20px;
    }

    .cookie-banner-container {
        flex-direction: column;
        gap: 20px;
    }

    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .cookie-banner-icon {
        font-size: 1.8rem;
    }

    .cookie-banner-text h3 {
        font-size: 1rem;
    }

    .cookie-banner-text p {
        font-size: 0.85rem;
    }

    .cookie-banner-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .cookie-btn {
        width: 100%;
        text-align: center;
        padding: 16px 32px;
    }

    .cookie-btn-decline,
    .cookie-btn-ghost {
        padding: 14px 30px;
    }

    #cookieBanner::before {
        width: 200px;
    }

    .cookie-categories {
        grid-template-columns: 1fr;
    }

    .cookie-settings-actions {
        justify-content: center;
        flex-direction: column;
        width: 100%;
    }

    .cookie-settings-actions .cookie-btn {
        width: 100%;
    }

    .cookie-category-desc {
        margin-left: 0;
        font-size: 0.7rem;
    }
}

/* Small phones */
@media (max-width: 480px) {
    #cookieBanner {
        padding: 16px;
    }

    .cookie-banner-text h3 {
        font-size: 0.95rem;
    }

    .cookie-banner-text p {
        font-size: 0.8rem;
    }

    .cookie-btn {
        font-size: 0.8rem;
        padding: 12px 20px;
    }

    .cookie-btn-decline {
        padding: 10px 18px;
    }
}