/* KVKK çerez banner ve tercih paneli */
.cookie-consent-banner {
    position: fixed;
    left: 1rem;
    bottom: 1rem;
    width: min(26rem, calc(100vw - 2rem));
    background: #ffffff;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 0.875rem;
    padding: 1rem 1.125rem;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06);
    z-index: 99990;
    opacity: 0;
    transform: translateY(1rem);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}

.cookie-consent-banner.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cookie-consent-banner .cookie-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.cookie-consent-banner .cookie-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background: #eff6ff;
    color: #2563eb;
    flex-shrink: 0;
    font-size: 1rem;
}

.cookie-consent-banner .cookie-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
    margin: 0;
}

.cookie-consent-banner .cookie-text {
    font-size: 0.8125rem;
    line-height: 1.55;
    color: #6b7280;
    margin: 0 0 1rem;
}

.cookie-consent-banner .cookie-text a {
    color: #2563eb;
    font-weight: 500;
    text-decoration: none;
}

.cookie-consent-banner .cookie-text a:hover {
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cookie-btn {
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.55rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    border: 1px solid transparent;
    width: 100%;
}

.cookie-btn-primary {
    background-color: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.cookie-btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

.cookie-btn-secondary {
    background: #f9fafb;
    color: #4b5563;
    border-color: #e5e7eb;
}

.cookie-btn-secondary:hover {
    background: #f3f4f6;
    color: #111827;
}

/* Tercih paneli */
.cookie-consent-panel {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.cookie-consent-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.cookie-panel-card {
    position: relative;
    width: min(32rem, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 0.875rem;
    padding: 1.25rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

.cookie-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.cookie-panel-header h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.cookie-panel-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
}

.cookie-category {
    border: 1px solid #e5e7eb;
    border-radius: 0.625rem;
    padding: 0.875rem;
    margin-bottom: 0.75rem;
}

.cookie-category-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-category-head strong {
    display: block;
    font-size: 0.875rem;
    color: #111827;
    margin-bottom: 0.25rem;
}

.cookie-category-head p {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.cookie-always-on {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #059669;
    background: #ecfdf5;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.cookie-panel-note {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0.75rem 0 1rem;
    line-height: 1.5;
}

.cookie-panel-save {
    width: 100%;
}

/* Toggle switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #d1d5db;
    border-radius: 9999px;
    transition: 0.2s;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.2s;
}

.cookie-switch input:checked + .cookie-slider {
    background-color: #2563eb;
}

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

body.cookie-panel-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    .cookie-consent-banner {
        left: 0.75rem;
        right: 0.75rem;
        bottom: 5.5rem;
        width: auto;
    }
}

@media (min-width: 640px) {
    .cookie-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .cookie-btn {
        flex: 1;
        min-width: calc(33% - 0.35rem);
    }
}
