/* Variables */
:root {
    --accent-color: #FF30D4;
    --accent-secondary: #fc8cfc;
    --accent-hover: #FFEAFB;
    --background-dark: #4D4D4D;
    --background-light: #FFF2FC;
    --background-card: #FFEAFB;
    --text-dark: #4D4D4D;
    --text-light: #666666;
    --text-muted: #9a9a9a;
    --border-radius: 20px;
    --border-radius-small: 12px;
    --shadow: 0 8px 32px rgba(255, 48, 212, 0.15);
    --shadow-hover: 0 12px 40px rgba(255, 48, 212, 0.25);
    --gradient-primary: linear-gradient(135deg, #FF30D4 0%, #801518 100%);
    --gradient-secondary: linear-gradient(135deg, #FFF2FC 0%, #FFEAFB 100%);
}

/* Simplified Keyframes */
@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes scale-in {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

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

/* Popup Modal Styles - Bottom Sheet Design */
.cookie-popup-container .cookie-popup {
    background: linear-gradient(180deg, #ffffff 0%, var(--background-light) 100%);
    color: var(--text-dark);
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -8px 48px rgba(255, 48, 212, 0.2), 0 0 0 1px rgba(255, 48, 212, 0.1);
    max-width: 100%;
    width: 100%;
    max-height: 70vh;
    margin: 0;
    padding: 0;
    position: relative;
    animation: slide-up 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    height: auto;
}

.cookie-popup-container .cookie-popup::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 5px;
    background: rgba(255, 48, 212, 0.4);
    border-radius: 3px;
    z-index: 1;
}

.cookie-popup-container .cookie-popup::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--gradient-primary);
    z-index: 1;
}

/* Cookie Panel Styles (Header Area) - Compact Design */
.cookie-panel {
    padding: 28px 32px 20px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: transparent;
    border-bottom: none;
    position: relative;
    flex-shrink: 0;
}

.cookie-popup .cookie-panel ul {
    list-style: none;
    display: flex;
    gap: 0;
    padding: 0;
    margin: 0;
    justify-content: center;
    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: 700;
    cursor: pointer;
    line-height: 1.2;
    padding: 14px 28px;
    border-radius: 16px;
    background: linear-gradient(135deg, #FF30D4 0%, #fc8cfc 100%);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    gap: 12px;
    font-size: 20px;
    margin-bottom: 0;
    position: relative;
    box-shadow: 0 4px 16px rgba(255, 48, 212, 0.3);
}

.cookie-popup .cookie-panel ul li.details-panel:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(255, 48, 212, 0.4);
    border-color: rgba(255, 255, 255, 0.5);
}

.cookie-popup .cookie-panel ul li.details-panel.active {
    box-shadow: 0 6px 20px rgba(255, 48, 212, 0.4);
    transform: scale(1.01);
}

/* Main heading styling */
.cookie-main-heading {
    color: var(--accent-secondary);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    text-align: center;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-color);
    position: relative;
}

.cookie-main-heading::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--accent-color);
    border-radius: 1px;
}

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

/* Cookie Content Area - Scrollable Section */
.cookie-popup-content-container {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.cookie-content.cookie-mid {
    padding: 0px 32px 20px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 1 1 auto;
    margin-right: 0;
    width: 100%;
    box-sizing: border-box;
    background: transparent;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) rgba(255, 48, 212, 0.1);
}

/* Cookie Categories Display Area - Grid Layout */
.cookie-cookies-display {
    padding: 0;
    max-height: none;
    overflow-y: visible;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) rgba(255, 48, 212, 0.1);
    scroll-behavior: smooth;
    flex-grow: 0;
    margin-right: 0;
    width: 100%;
    box-sizing: border-box;
    background: transparent;
    border-radius: 0;
    border: none;
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* Custom scrollbar for cookie content area */
.cookie-content.cookie-mid::-webkit-scrollbar {
    width: 8px;
    background: rgba(255, 48, 212, 0.1);
    border-radius: 10px;
}

.cookie-content.cookie-mid::-webkit-scrollbar-track {
    background: rgba(255, 48, 212, 0.05);
    border-radius: 10px;
    margin: 8px 0;
}

.cookie-content.cookie-mid::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.cookie-content.cookie-mid::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* Custom scrollbar for Webkit browsers */
.cookie-cookies-display::-webkit-scrollbar {
    width: 8px;
    background: transparent;
    border-radius: 8px;
}

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

.cookie-cookies-display > p {
    margin-bottom: 20px;
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.7;
    text-align: center;
    font-weight: 400;
    padding: 18px 24px;
    background: linear-gradient(135deg, rgba(255, 48, 212, 0.08) 0%, rgba(252, 140, 252, 0.08) 100%);
    border-radius: 18px;
    border: 1px solid rgba(255, 48, 212, 0.15);
    position: relative;
}

.cookie-cookies-display > h5 {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--accent-color);
    padding: 0 16px;
}

.cookie-category {
    background: #ffffff;
    border-radius: 18px;
    margin-bottom: 0;
    padding: 20px 22px;
    border: 2px solid rgba(255, 48, 212, 0.15);
    box-shadow: 0 3px 12px rgba(255, 48, 212, 0.08);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}

.cookie-category::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(255, 48, 212, 0.1) 0%, transparent 70%);
    border-radius: 0 18px 0 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cookie-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 48, 212, 0.15);
    border-color: rgba(255, 48, 212, 0.3);
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 242, 252, 0.5) 100%);
}

.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(--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(--text-muted);
    font-weight: 400;
    padding-left: 4px;
}

/* Toggle Switch Styles - Replacing Checkboxes */
.cookie-cookies-display .cookie-category .choose {
    width: 52px;
    height: 28px;
    border-radius: 14px;
    border: 2px solid rgba(255, 48, 212, 0.3);
    cursor: pointer;
    position: relative;
    background: #e0e0e0;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.cookie-cookies-display .cookie-category .choose::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    left: 3px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.cookie-cookies-display .cookie-category .choose:hover:not(.always-on) {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(255, 48, 212, 0.1);
}

.cookie-cookies-display .cookie-category .choose.active {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, #FF30D4 0%, #fc8cfc 100%);
    box-shadow: 0 0 0 4px rgba(255, 48, 212, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cookie-cookies-display .cookie-category .choose.active::before {
    transform: translateX(24px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.cookie-cookies-display .cookie-category .choose.active::after {
    content: '';
    position: absolute;
    left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: opacity 0.3s ease;
}

.cookie-cookies-display .cookie-category .choose.always-on {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, #FF30D4 0%, #fc8cfc 100%);
    cursor: not-allowed;
    opacity: 0.85;
}

.cookie-cookies-display .cookie-category .choose.always-on::before {
    transform: translateX(24px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.cookie-cookies-display .cookie-category .choose.always-on::after {
    content: '';
    position: absolute;
    left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
}

/* Button Area Styles - Fixed Footer */
.cookie-decide {
    width: 100%;
    padding: 24px 32px 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 242, 252, 1) 100%);
    border-radius: 0;
    box-shadow: 0 -4px 16px rgba(255, 48, 212, 0.1);
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
    justify-content: center;
    flex-shrink: 0;
    border-top: 2px solid rgba(255, 48, 212, 0.15);
    position: relative;
}

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

.cookie-decide .pre-cookie-box h4 {
    color: var(--accent-secondary);
    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(--accent-color);
    text-decoration: none;
    transition: color 0.2s;
    border-bottom: 1px solid var(--accent-color);
}

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

.cookie-decide ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    justify-content: stretch;
    align-items: stretch;
    padding: 0;
    margin: 0;
    width: 100%;
}

.cookie-decide ul li {
    padding: 14px 24px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 2px solid transparent;
    background: #ffffff;
    color: var(--text-dark);
    box-shadow: 0 2px 8px rgba(255, 48, 212, 0.1);
}

.cookie-decide ul li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 48, 212, 0.2);
    border-color: rgba(255, 48, 212, 0.3);
}

.cookie-decide ul li.allow {
    background: linear-gradient(135deg, #FF30D4 0%, #fc8cfc 100%);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
    justify-content: center;
}

.cookie-decide ul li.allow:hover {
    background: linear-gradient(135deg, #fc8cfc 0%, #FF30D4 100%);
    box-shadow: 0 6px 20px rgba(255, 48, 212, 0.3);
}

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

/* Responsive Adjustments */
@media (max-width: 768px) {
    .cookie-popup-container {
        padding: 0;
    }
    
    .cookie-popup-container .cookie-popup {
        max-width: 100%;
        max-height: 85vh;
        border-radius: 24px 24px 0 0;
    }
    
    .cookie-panel {
        padding: 24px 24px 16px;
    }
    
    .cookie-content.cookie-mid {
        padding: 0px 24px 16px;
    }
    
    .cookie-decide {
        padding: 20px 24px 24px;
    }
    
    .cookie-popup .cookie-panel ul li.details-panel {
        font-size: 17px;
        gap: 10px;
        padding: 12px 22px;
    }
    
    .cookie-popup .cookie-panel ul li.details-panel .cookie-icon {
        font-size: 24px;
    }
    
    .cookie-cookies-display {
        gap: 14px;
    }
    
    .cookie-cookies-display > p {
        margin-bottom: 18px;
        font-size: 14px;
        padding: 16px 20px;
    }
    
    .cookie-cookies-display > h5 {
        font-size: 17px;
        margin-bottom: 14px;
    }
    
    .cookie-category {
        padding: 18px 20px;
        border-radius: 16px;
    }
    
    .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: 48px;
        height: 26px;
    }
    
    .cookie-cookies-display .cookie-category .choose::before {
        width: 20px;
        height: 20px;
    }
    
    .cookie-cookies-display .cookie-category .choose.active::before,
    .cookie-cookies-display .cookie-category .choose.always-on::before {
        transform: translateX(22px);
    }
    
    .cookie-decide {
        gap: 14px;
        padding: 20px 24px 28px;
    }
    
    .cookie-decide ul {
        gap: 12px;
        grid-template-columns: 1fr;
    }
    
    .cookie-decide ul li {
        padding: 13px 20px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .cookie-popup-container .cookie-popup {
        max-height: 90vh;
        border-radius: 20px 20px 0 0;
    }
    
    .cookie-panel {
        padding: 22px 20px 14px;
    }
    
    .cookie-content.cookie-mid {
        padding: 0px 20px 16px;
    }
    
    .cookie-decide {
        padding: 18px 20px 22px;
        gap: 12px;
    }
    
    .cookie-popup .cookie-panel ul li.details-panel {
        font-size: 16px;
        gap: 8px;
        padding: 11px 18px;
        border-radius: 14px;
    }
    
    .cookie-popup .cookie-panel ul li.details-panel .cookie-icon {
        font-size: 22px;
    }
    
    .cookie-cookies-display {
        gap: 12px;
    }
    
    .cookie-cookies-display > p {
        padding: 14px 18px;
        font-size: 13px;
    }
    
    .cookie-cookies-display > h5 {
        font-size: 16px;
    }
    
    .cookie-category {
        padding: 16px 18px;
        border-radius: 14px;
    }
    
    .cookie-cookies-display .cookie-category .choose {
        width: 46px;
        height: 24px;
    }
    
    .cookie-cookies-display .cookie-category .choose::before {
        width: 18px;
        height: 18px;
    }
    
    .cookie-cookies-display .cookie-category .choose.active::before,
    .cookie-cookies-display .cookie-category .choose.always-on::before {
        transform: translateX(22px);
    }
    
    .cookie-decide ul {
        gap: 10px;
    }
    
    .cookie-decide ul li {
        padding: 12px 18px;
        font-size: 14px;
    }
}