/* Cookie Popup - Redesigned with Sharp Corners */
:root {
    --cookie-primary: #635BEC;
    --cookie-primary-hover: #5248E8;
    --cookie-cyan: #00D1E0;
    --cookie-dark: #061C63;
    --cookie-bg-light: #E0E8FF;
    --cookie-bg-lighter: #E9EEFF;
    --cookie-text: #757575;
    --cookie-text-dark: #4D4D4D;
    --cookie-text-light: #9a9a9a;
    --cookie-radius: 0px;
    --cookie-shadow: 0 8px 32px rgba(99, 91, 236, 0.15);
    --cookie-shadow-hover: 0 12px 40px rgba(99, 91, 236, 0.25);
    --cookie-gradient: linear-gradient(135deg, #00D1E0 0%, #635BEC 50%, #061C63 100%);
}

@keyframes slide-up-right {
    from { transform: translateX(100%) translateY(20px); opacity: 0; }
    to { transform: translateX(0) translateY(0); opacity: 1; }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Popup */
.cookie-popup-container .cookie-popup {
    background: var(--cookie-bg-lighter);
    color: var(--cookie-text-dark);
    border-radius: var(--cookie-radius);
    box-shadow: var(--cookie-shadow);
    max-width: 550px;
    width: 100%;
    margin: 0 30px 30px 0;
    padding: 0;
    position: relative;
    animation: slide-up-right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid var(--cookie-primary);
    display: grid;
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
    box-sizing: border-box;
    max-height: 95vh;
}

.cookie-popup-container .cookie-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--cookie-primary);
    z-index: 1;
}

.cookie-popup-container .cookie-popup:hover {
    box-shadow: var(--cookie-shadow-hover);
    border-color: var(--cookie-primary-hover);
}

/* Header Panel */
.cookie-panel {
    padding: 24px 30px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    background: var(--cookie-primary);
    border-bottom: 2px solid var(--cookie-primary-hover);
    position: relative;
}

.cookie-popup .cookie-panel ul {
    list-style: none;
    display: flex;
    gap: 0;
    padding: 0;
    margin: 0;
    justify-content: flex-start;
    border-bottom: none;
    width: 100%;
}

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

.cookie-popup .cookie-panel ul li.details-panel {
    flex: unset;
    font-weight: 800;
    cursor: pointer;
    line-height: 1.2;
    padding: 0;
    border-radius: var(--cookie-radius);
    background-color: transparent;
    transition: transform 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    gap: 0;
    font-size: 20px;
    margin-bottom: 0;
    position: relative;
    color: #fff;
}

.cookie-popup .cookie-panel ul li.details-panel:hover {
    transform: translateX(4px);
}

.cookie-popup .cookie-panel ul li.details-panel.active {
    box-shadow: none;
}

.cookie-panel .text-white,
.cookie-panel h3 {
    color: #fff !important;
    margin: 0;
}

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

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

/* Cookies Display */
.cookie-cookies-display {
    padding: 28px 0;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--cookie-primary) transparent;
    scroll-behavior: smooth;
    flex-grow: 1;
    margin-right: 0;
    width: 100%;
    box-sizing: border-box;
    background: transparent;
    border-radius: var(--cookie-radius);
    border: none;
    position: relative;
}

.cookie-cookies-display::-webkit-scrollbar {
    width: 8px;
    background: transparent;
    border-radius: 8px;
}

.cookie-cookies-display::-webkit-scrollbar-thumb {
    background: var(--cookie-primary);
    border-radius: 8px;
}

.cookie-cookies-display > h5,
.cookie-cookies-display .text-purple {
    color: var(--cookie-primary) !important;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cookie-cookies-display > p {
    margin-bottom: 28px;
    font-size: 15px;
    color: var(--cookie-text);
    line-height: 1.6;
    text-align: left;
    font-weight: 400;
    padding: 18px 24px;
    background: var(--cookie-bg-light);
    border-radius: var(--cookie-radius);
    border: 1px solid rgba(99, 91, 236, 0.2);
    border-left: 3px solid var(--cookie-primary);
}

/* Cookie Categories */
.cookie-category {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--cookie-radius);
    margin-bottom: 14px;
    padding: 18px 22px;
    border: 1px solid rgba(99, 91, 236, 0.25);
    box-shadow: 0 2px 6px rgba(99, 91, 236, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    color: var(--cookie-text-light);
    position: relative;
    overflow: hidden;
}

.cookie-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--cookie-primary);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cookie-category:hover {
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(99, 91, 236, 0.12);
    border-color: var(--cookie-primary);
    background: #fff;
}

.cookie-category:hover::before {
    opacity: 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: 14px;
}

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

.cookie-cookies-display .cookie-category .cat-describe {
    margin-top: 8px;
    line-height: 1.6;
    color: var(--cookie-text-light);
    font-weight: 400;
    padding-left: 4px;
}

/* Radio Buttons */
.cookie-cookies-display .cookie-category .choose {
    font-size: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--cookie-primary);
    cursor: pointer;
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(99, 91, 236, 0.15);
    flex-shrink: 0;
}

.cookie-cookies-display .cookie-category .choose:hover:not(.always-on) {
    border-color: var(--cookie-primary-hover);
    box-shadow: 0 3px 10px rgba(99, 91, 236, 0.25);
    transform: scale(1.1);
}

.cookie-cookies-display .cookie-category .choose.active {
    border-color: var(--cookie-primary-hover);
    background: var(--cookie-primary);
    box-shadow: 0 3px 10px rgba(99, 91, 236, 0.25);
    transform: scale(1.1);
}

.cookie-cookies-display .cookie-category .choose.active::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: white;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

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

.cookie-cookies-display .cookie-category .choose.always-on::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: white;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Button Area */
.cookie-decide {
    width: 100%;
    padding: 24px 30px;
    background: var(--cookie-bg-light);
    border-radius: var(--cookie-radius);
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0;
    border-top: 2px solid var(--cookie-primary);
}

.cookie-decide .pre-cookie-box {
    padding: 0;
    color: var(--cookie-text);
    line-height: 1.5;
    display: none;
}

.cookie-decide .pre-cookie-box h4 {
    color: var(--cookie-primary);
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
}

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

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

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

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

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

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

.cookie-decide ul li[class*="allow"],
.cookie-decide ul li[class*="customize"] {
    background: var(--cookie-primary) !important;
    color: #fff !important;
    border: 2px solid var(--cookie-primary) !important;
    padding: 12px 32px;
    text-transform: uppercase;
    border-radius: var(--cookie-radius);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(99, 91, 236, 0.3);
    font-weight: 600;
    font-family: "Poppins", sans-serif;
    position: relative;
    overflow: hidden;
    line-height: 1.2;
}

.cookie-decide ul li[class*="allow"]::before,
.cookie-decide ul li[class*="customize"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
    z-index: 1;
}

.cookie-decide ul li[class*="allow"]:hover::before,
.cookie-decide ul li[class*="customize"]:hover::before {
    left: 0;
}

.cookie-decide ul li[class*="allow"]:hover,
.cookie-decide ul li[class*="customize"]:hover {
    background: var(--cookie-primary-hover) !important;
    border-color: var(--cookie-primary-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 91, 236, 0.4);
}

.cookie-decide ul li > * {
    position: relative;
    z-index: 2;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-popup-container {
        padding: 0;
        align-items: flex-end;
        justify-content: center;
    }
    
    .cookie-popup-container .cookie-popup {
        max-width: 100%;
        margin: 0;
        max-height: 90vh;
        border-left: none;
        border-right: none;
        border-bottom: none;
    }
    
    .cookie-panel {
        padding: 20px 24px;
    }
    
    .cookie-popup .cookie-panel ul li.details-panel {
        font-size: 18px;
    }
    
    .cookie-content.cookie-mid {
        padding: 0px 24px;
    }
    
    .cookie-cookies-display {
        max-height: 320px;
        padding: 24px 0;
    }
    
    .cookie-cookies-display > p {
        margin-bottom: 20px;
        font-size: 14px;
        padding: 16px 20px;
    }
    
    .cookie-category {
        padding: 16px 20px;
    }
    
    .cookie-cookies-display .cookie-category .data .data-resume .cat-main .cookie-cat-name {
        font-size: 15px;
    }
    
    .cookie-cookies-display .cookie-category .cat-describe {
        font-size: 13px;
    }
    
    .cookie-cookies-display .cookie-category .choose {
        width: 22px;
        height: 22px;
    }
    
    .cookie-cookies-display .cookie-category .choose.active::after,
    .cookie-cookies-display .cookie-category .choose.always-on::after {
        width: 8px;
        height: 8px;
    }
    
    .cookie-decide {
        gap: 16px;
        padding: 20px 24px;
    }
    
    .cookie-decide ul {
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .cookie-panel {
        padding: 18px 20px;
    }
    
    .cookie-popup .cookie-panel ul li.details-panel {
        font-size: 16px;
    }
    
    .cookie-content.cookie-mid {
        padding: 0px 20px;
    }
    
    .cookie-cookies-display {
        max-height: 280px;
        padding: 20px 0;
    }
    
    .cookie-category {
        padding: 14px 18px;
    }
    
    .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 {
        width: 7px;
        height: 7px;
    }
    
    .cookie-decide {
        padding: 18px 20px;
    }
    
    .cookie-decide ul {
        flex-direction: column;
        gap: 12px;
    }
    
    .cookie-decide ul li[class*="allow"],
    .cookie-decide ul li[class*="customize"] {
        width: 100%;
        text-align: center;
    }
}
