/* Optimized Cookie Popup Design - Performance Focused */
:root {
    --accent-color: #F6F6F7;
    --accent-hover: #7E808F;
    --background-light: #040404;
    --background-dark: #0A0A0A;
    --background-medium: #1A1A1A;
    --text-dark: #F6F6F7;
    --text-light: #7E808F;
    --text-muted: #ADB5BD;
    --border-radius: 16px;
    --border-radius-lg: 24px;
    --shadow: 0 8px 32px rgba(0,0,0,0.6);
    --shadow-hover: 0 12px 40px rgba(0,0,0,0.7);
    --transition: all 0.2s ease;
    --transition-fast: all 0.15s ease;
    --glass-bg: #0A0A0A;
    --glass-card: #1A1A1A;
}

/* Simplified Keyframes - Only essential animations */
@keyframes slideInUp {
    from { 
        transform: translateY(100%); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0); 
        opacity: 1; 
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes checkmark {
    0% { 
        opacity: 0; 
        transform: scale(0.5); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1); 
    }
}

/* Backdrop - Simplified */
.cookie-popup-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 9999999;
    padding: 0;
    box-sizing: border-box;
    animation: fadeIn 0.3s ease-out;
}

/* Main Popup Container - No backdrop-filter for performance */
.cookie-popup-container .cookie-popup {
    background: linear-gradient(135deg, #0A0A0A 0%, #1A1A1A 100%);
    color: var(--text-dark);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    font-family: "Plus Jakarta Sans", sans-serif;
    animation: slideInUp 0.4s ease-out;
    overflow: hidden;
}

/* Subtle border effect - performance optimized */
.cookie-popup-container .cookie-popup::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    padding: 1px;
    background: linear-gradient(180deg, #F6F6F7 0%, rgba(126, 128, 143, 0.2) 100%);
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
    z-index: -1;
}

.cookie-popup-container .cookie-popup:hover {
    box-shadow: var(--shadow-hover);
    transition: var(--transition);
}

/* Header Section - No backdrop-filter */
.cookie-panel {
    background: linear-gradient(135deg, #1A1A1A 0%, #262626 100%);
    padding: 12px 40px;
    margin: 0;
    position: relative;
    border-bottom: 1px solid rgba(246, 246, 247, 0.1);
}

.cookie-popup .cookie-panel ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 0;
    padding: 0;
    margin: 0;
    border-bottom: none;
    width: 100%;
    position: relative;
    z-index: 2;
}

.cookie-popup .cookie-panel ul li.consent-panel {
    display: none;
}

.cookie-popup .cookie-panel ul li.details-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    
}



.cookie-popup .cookie-panel ul li.details-panel.active {
    color: var(--text-dark);
    background: transparent;
    border-color: transparent;
}

.cookie-popup .cookie-panel ul li.details-panel .cookie-icon {
    font-size: 32px;
    margin-right: 0;
    color: var(--accent-color);
    transition: var(--transition-fast);
    display: inline-block;
}

.cookie-popup .cookie-panel ul li.details-panel:hover .cookie-icon {
    transform: scale(1.05);
}

.cookie-popup .cookie-panel ul li.details-panel .subtitle {
    display: none;
}

/* Content Area */
.cookie-content.cookie-mid {
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex-grow: 1;
    margin-right: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Cookie Categories Display */
.cookie-cookies-display {
    padding: 40px;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) var(--background-medium);
    flex-grow: 1;
    margin-right: 0;
    width: 100%;
    box-sizing: border-box;
    background: transparent;
}

/* Simplified scrollbar */
.cookie-cookies-display::-webkit-scrollbar {
    width: 6px;
    background: var(--background-medium);
    border-radius: 3px;
}

.cookie-cookies-display::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 3px;
}

.cookie-cookies-display > p {
    margin-bottom: 32px;
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.7;
    text-align: left;
    font-weight: 400;
}

.cookie-cookies-display > p b {
    color: var(--text-dark);
    font-weight: 600;
}

/* Cookie Category Cards - No backdrop-filter for performance */
.cookie-category {
    background: linear-gradient(135deg, #1A1A1A 0%, #262626 100%);
    border-radius: 12px;
    margin-bottom: 16px;
    padding: 20px;
    border: 1px solid rgba(246, 246, 247, 0.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: var(--transition-fast);
    color: var(--text-light);
    position: relative;
}

.cookie-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--accent-color);
    transform: scaleY(0);
    transition: var(--transition-fast);
}

.cookie-category:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    transform: translateY(-1px);
    border-color: rgba(246, 246, 247, 0.2);
}

.cookie-category:hover::before {
    transform: scaleY(1);
}

.cookie-cookies-display .cookie-category .data .data-resume .cat-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.cookie-cookies-display .cookie-category .data .data-resume .cat-main > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cookie-cookies-display .cookie-category .data .data-resume .cat-main .cookie-cat-name {
    margin: 0;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 16px;
}

.cookie-cookies-display .cookie-category .cat-describe {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-light);
}

/* Simplified Checkbox Design */
.cookie-cookies-display .cookie-category .choose {
    font-size: 0;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid var(--accent-color);
    cursor: pointer;
    position: relative;
    background: var(--background-light);
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cookie-cookies-display .cookie-category .choose::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--accent-color);
    transform: scale(0);
    transition: var(--transition-fast);
    border-radius: 4px;
}

.cookie-cookies-display .cookie-category .choose:hover:not(.always-on) {
    border-color: var(--accent-hover);
    box-shadow: 0 2px 8px rgba(246, 246, 247, 0.2);
    transform: scale(1.05);
}

.cookie-cookies-display .cookie-category .choose.active {
    border-color: var(--accent-color);
}

.cookie-cookies-display .cookie-category .choose.active::before {
    transform: scale(1);
}

.cookie-cookies-display .cookie-category .choose.active::after {
    content: "✓";
    font-size: 14px;
    color: #040404;
    position: absolute;
    font-weight: bold;
    animation: checkmark 0.2s ease;
}

.cookie-cookies-display .cookie-category .choose.always-on {
    border-color: var(--accent-color);
    background: var(--accent-color);
    cursor: not-allowed;
    opacity: 0.8;
}

.cookie-cookies-display .cookie-category .choose.always-on::after {
    content: "✓";
    font-size: 14px;
    color: #040404;
    position: absolute;
    font-weight: bold;
}

/* Button Area - Optimized Glass Effect */
.cookie-decide {
    width: 100%;
    padding: 32px 40px;
    background: linear-gradient(135deg, #1A1A1A 0%, #262626 100%);
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0;
    border-top: 1px solid rgba(246, 246, 247, 0.1);
}

.cookie-decide .pre-cookie-box {
    padding: 0;
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.6;
    display: none;
    text-align: center;
    max-width: 80%;
}

.cookie-decide .pre-cookie-box h4 {
    color: var(--accent-color);
    margin-bottom: 12px;
    font-size: 18px;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-weight: 600;
}

.cookie-decide .pre-cookie-box p {
    margin-bottom: 12px;
}

.cookie-decide .pre-cookie-box p:last-child {
    margin-bottom: 0;
}

.cookie-decide .pre-cookie-box a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition-fast);
    border-bottom: 1px solid var(--accent-color);
}

.cookie-decide .pre-cookie-box a:hover {
    color: var(--accent-hover);
    border-color: var(--accent-hover);
}

.cookie-decide ul {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    flex-direction: row;
}

.cookie-decide ul li.allow-selection {
    display: none;
}

/* Simplified Button Styles - Removed heavy animations */
.cookie-decide ul li button,
.cookie-decide ul li input[type="button"],
.cookie-decide ul li input[type="submit"] {
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    height: 48px;
    padding: 0 22px;
    border: 1px solid var(--accent-color);
    background: var(--background-light);
    color: var(--accent-color);
    text-decoration: none;
    position: relative;
    border-radius: 0;
    overflow: hidden;
    transition: var(--transition);
    font-family: "Plus Jakarta Sans", sans-serif;
    font-weight: 600;
    font-size: 16px;
}

.cookie-decide ul li button:hover,
.cookie-decide ul li input[type="button"]:hover,
.cookie-decide ul li input[type="submit"]:hover {
    background: var(--accent-color);
    color: var(--background-light);
    transform: translateY(-1px);
}

/* White button variant for secondary actions */
.cookie-decide ul li button.white-btn,
.cookie-decide ul li input[type="button"].white-btn,
.cookie-decide ul li input[type="submit"].white-btn {
    background: var(--accent-color);
    color: var(--background-light);
    border-color: var(--accent-color);
}

.cookie-decide ul li button.white-btn:hover,
.cookie-decide ul li input[type="button"].white-btn:hover,
.cookie-decide ul li input[type="submit"].white-btn:hover {
    background: var(--background-light);
    color: var(--accent-color);
    transform: translateY(-1px);
}

/* Responsive Design - Mobile and Tablet */
@media (max-width: 640px) {
    .cookie-popup-container {
        padding: 0;
        align-items: center;
    }
    
    .cookie-popup-container .cookie-popup {
        border-radius: 20px;
        max-width: 98%;
        max-height: 85vh;
        margin: 10px;
    }
    
    .cookie-panel {
        padding: 20px 20px 16px;
    }
    
    .cookie-popup .cookie-panel ul li.details-panel {
        font-size: 20px;
        gap: 10px;
        text-align: center;
    }
    
    .cookie-popup .cookie-panel ul li.details-panel .cookie-icon {
        font-size: 32px;
    }
    
    .cookie-cookies-display {
        padding: 20px;
        max-height: 200px;
    }
    
    .cookie-cookies-display > p {
        margin-bottom: 24px;
        font-size: 15px;
    }
    
    .cookie-category {
        padding: 16px;
        margin-bottom: 12px;
    }
    
    .cookie-cookies-display .cookie-category .data .data-resume .cat-main .cookie-cat-name {
        font-size: 15px;
    }
    
    .cookie-cookies-display .cookie-category .choose {
        width: 20px;
        height: 20px;
    }
    
    .cookie-cookies-display .cookie-category .choose.active::after,
    .cookie-cookies-display .cookie-category .choose.always-on::after {
        font-size: 12px;
    }
    
    .cookie-decide {
        padding: 20px;
        gap: 16px;
    }
    
    .cookie-decide ul {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }
    
    .cookie-decide ul li {
        width: 100%;
    }
    
    .cookie-decide ul li button,
    .cookie-decide ul li input[type="button"],
    .cookie-decide ul li input[type="submit"] {
        width: 100%;
        justify-content: center;
    }
}

/* Additional mobile adjustments for very small screens */
@media (max-width: 360px) {
    .cookie-popup-container .cookie-popup {
        max-width: 100%;
        margin: 5px;
        border-radius: 16px;
    }
    
    .cookie-cookies-display .cookie-category .data .data-resume .cat-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}