/**
 * Cookie Consent Banner Styles
 * KVKK/GDPR Uyumlu Çerez İzin Bildirimi
 */

/* ===== Banner Base ===== */
.cookie-consent {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 99999;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    color: #fff;
    padding: 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    animation: cookieSlideIn 0.4s ease-out;
    font-family: inherit;
}

/* Position Variants */
.cookie-consent--bottom {
    bottom: 0;
}

.cookie-consent--top {
    top: 0;
    bottom: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.cookie-consent--bottom-left,
.cookie-consent--bottom-right {
    left: auto;
    right: auto;
    bottom: 20px;
    max-width: 420px;
    border-radius: 16px;
    margin: 20px;
}

.cookie-consent--bottom-left {
    left: 0;
}

.cookie-consent--bottom-right {
    right: 0;
}

/* Style Variants */
.cookie-consent--bar .cookie-consent__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    flex-wrap: wrap;
}

.cookie-consent--popup .cookie-consent__container,
.cookie-consent--corner .cookie-consent__container {
    display: flex;
    flex-direction: column;
    padding: 24px;
    gap: 16px;
}

/* Animation */
@keyframes cookieSlideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-consent--top {
    animation-name: cookieSlideInTop;
}

@keyframes cookieSlideInTop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== Content ===== */
.cookie-consent__content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
}

.cookie-consent__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.cookie-consent__text {
    flex: 1;
}

.cookie-consent__title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: #fff;
}

.cookie-consent__description {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 8px 0;
    opacity: 0.9;
}

.cookie-consent__link {
    color: #90cdf4;
    text-decoration: none;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.cookie-consent__link:hover {
    color: #fff;
    text-decoration: underline;
}

/* ===== Buttons ===== */
.cookie-consent__actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.cookie-consent__btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.cookie-consent__btn--accept {
    background: #48bb78;
    color: #fff;
}

.cookie-consent__btn--accept:hover {
    background: #38a169;
    transform: translateY(-1px);
}

.cookie-consent__btn--reject {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-consent__btn--reject:hover {
    background: rgba(255, 255, 255, 0.25);
}

.cookie-consent__btn--settings {
    background: transparent;
    color: #90cdf4;
    border: 1px solid #90cdf4;
}

.cookie-consent__btn--settings:hover {
    background: rgba(144, 205, 244, 0.15);
}

/* ===== Modal ===== */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.cookie-modal__content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cookie-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    color: #fff;
}

.cookie-modal__header h3 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-modal__close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.cookie-modal__close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.cookie-modal__body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 160px);
}

.cookie-modal__info {
    background: #f7fafc;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #4a5568;
}

.cookie-modal__info a {
    color: #2b6cb0;
}

.cookie-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f7fafc;
}

/* ===== Cookie Categories ===== */
.cookie-categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cookie-category {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.cookie-category:hover {
    border-color: #cbd5e0;
}

.cookie-category__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    gap: 16px;
}

.cookie-category__info {
    flex: 1;
}

.cookie-category__name {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #2d3748;
}

.cookie-category__desc {
    font-size: 13px;
    margin: 0;
    color: #718096;
}

.cookie-category__badge {
    background: #48bb78;
    color: #fff;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}

/* ===== Toggle Switch ===== */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.cookie-toggle__input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle__slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e0;
    border-radius: 28px;
    transition: all 0.3s ease;
}

.cookie-toggle__slider::before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.cookie-toggle__input:checked + .cookie-toggle__slider {
    background: #48bb78;
}

.cookie-toggle__input:checked + .cookie-toggle__slider::before {
    transform: translateX(22px);
}

.cookie-toggle__input:focus + .cookie-toggle__slider {
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.3);
}

/* ===== Floating Button ===== */
.cookie-floating-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 9998;
    transition: all 0.3s ease;
}

.cookie-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .cookie-consent--bar .cookie-consent__container {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .cookie-consent__content {
        flex-direction: column;
        align-items: center;
    }

    .cookie-consent__actions {
        width: 100%;
        justify-content: center;
    }

    .cookie-consent__btn {
        flex: 1;
        justify-content: center;
        min-width: 100px;
    }

    .cookie-consent--bottom-left,
    .cookie-consent--bottom-right {
        left: 10px;
        right: 10px;
        max-width: none;
        margin: 10px;
    }

    .cookie-modal__content {
        max-height: 95vh;
        border-radius: 12px 12px 0 0;
        margin-top: auto;
    }

    .cookie-modal {
        align-items: flex-end;
        padding: 0;
    }

    .cookie-category__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .cookie-category__toggle {
        align-self: flex-end;
    }
}

/* ===== Dark Mode Support ===== */
@media (prefers-color-scheme: dark) {
    .cookie-modal__content {
        background: #1a202c;
        color: #e2e8f0;
    }

    .cookie-modal__body {
        background: #1a202c;
    }

    .cookie-modal__info {
        background: #2d3748;
        color: #e2e8f0;
    }

    .cookie-modal__footer {
        background: #2d3748;
        border-color: #4a5568;
    }

    .cookie-modal__header {
        border-color: #4a5568;
    }

    .cookie-category {
        border-color: #4a5568;
    }

    .cookie-category__name {
        color: #e2e8f0;
    }

    .cookie-category__desc {
        color: #a0aec0;
    }
}

/* ===== Print ===== */
@media print {
    .cookie-consent,
    .cookie-modal,
    .cookie-floating-btn {
        display: none !important;
    }
}
