/* =========================================
   MU-KA Cookie Consent Panel (KVKK)
   ========================================= */

.cookie-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(71, 46, 29, 0.15); /* Brand warm accent/overlay tone */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.cookie-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.cookie-panel {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    background: #1a1a2e;
    color: #e0e0e0;
    border-radius: 1.25rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    transform: translateY(150%);
    opacity: 0;
    max-height: 80vh;
    width: min(420px, calc(100vw - 3rem));
    overflow-y: auto;
}

.cookie-panel.visible {
    animation: slideInElastic 0.65s cubic-bezier(0.25, 1.25, 0.5, 1.1) forwards;
}

.cookie-panel.hiding {
    animation: slideOutSmooth 0.4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes slideInElastic {
    0% {
        transform: translateY(150%) scale(0.9);
        opacity: 0;
    }
    65% {
        transform: translateY(-10px) scale(1.02);
        opacity: 1;
    }
    85% {
        transform: translateY(3px) scale(0.99);
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes slideOutSmooth {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(150%) scale(0.9);
        opacity: 0;
    }
}

.cookie-panel-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.4rem 0;
    font-family: 'Playfair Display', serif; /* Matches logo/headings */
}

.cookie-panel-desc {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #b0b0c0;
    margin: 0 0 1rem 0;
}

/* Category Cards */
.cookie-categories {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.cookie-category {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.85rem;
    padding: 0.85rem 1rem;
    transition: border-color 0.2s ease;
}

.cookie-category:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.cookie-toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.cookie-category-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #ffffff;
}

.cookie-required-badge {
    font-size: 0.65rem;
    font-weight: 500;
    background: rgba(99, 179, 146, 0.15);
    color: #63b392;
    padding: 0.15rem 0.5rem;
    border-radius: 2rem;
    white-space: nowrap;
}

.cookie-category-desc {
    font-size: 0.78rem;
    line-height: 1.4;
    color: #8a8a9a;
    margin: 0.5rem 0 0;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    width: 42px;
    height: 22px;
    flex-shrink: 0;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #3a3a50;
    border-radius: 22px;
    transition: background 0.3s ease;
}

.cookie-slider::before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.cookie-toggle input:checked + .cookie-slider {
    background: #63b392;
}

.cookie-toggle input:checked + .cookie-slider::before {
    transform: translateX(20px);
}

.cookie-toggle input:disabled + .cookie-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Buttons */
.cookie-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.cookie-btn {
    padding: 0.55rem 1rem;
    border-radius: 0.65rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 110px;
    text-align: center;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #63b392, #4a9e7e);
    color: #ffffff;
}

.cookie-btn-accept:hover {
    background: linear-gradient(135deg, #4a9e7e, #3d8a6b);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 179, 146, 0.2);
}

.cookie-btn-selected {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.cookie-btn-selected:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.cookie-btn-necessary {
    background: transparent;
    color: #8a8a9a;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cookie-btn-necessary:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.15);
}

/* Privacy Link */
.cookie-privacy-link {
    text-align: center;
}

.cookie-privacy-link a {
    font-size: 0.75rem;
    color: #63b392;
    text-decoration: none;
    transition: color 0.2s;
}

.cookie-privacy-link a:hover {
    color: #4a9e7e;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
    .cookie-panel {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        width: auto;
        padding: 1.25rem 1rem;
    }

    .cookie-actions {
        flex-direction: column;
    }

    .cookie-btn {
        min-width: auto;
        width: 100%;
    }
}
