/* Gurinox marka renkleri — tema (custom.css) ile uyumlu */
:root {
    --by-cookie-accent: var(--accent-color, #e7820f);
    --by-cookie-accent-dark: var(--accent-secondary-color, #ea850d);
    --by-cookie-accent-rgb: 231, 130, 15;
    --by-cookie-text: var(--text-color, #62605d);
    --by-cookie-heading: var(--primary-color, #000000);
    --by-cookie-bg: var(--white-color, #ffffff);
    --by-cookie-muted-bg: var(--secondary-color, #fbf9f6);
}

.by-cookie-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9998;
}

.by-cookie-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.by-cookie-consent {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(200%);
    width: 90%;
    max-width: 32rem;
    background: var(--by-cookie-bg);
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
    z-index: 9999;
    font-family: inherit;
}

.by-cookie-consent.is-active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.by-cookie-content {
    padding: 1.5rem;
}

.by-cookie-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0 0 0.5rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--by-cookie-heading);
}

.by-cookie-title img {
    width: 50px;
    height: auto;
    flex-shrink: 0;
}

.by-cookie-description {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--by-cookie-text);
}

.by-cookie-description + .by-cookie-description {
    margin-top: 0.75rem;
}

.by-cookie-description a {
    color: var(--by-cookie-accent);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.by-cookie-description a:hover {
    color: var(--by-cookie-accent-dark);
}

.by-cookie-preferences {
    margin: 1.25rem 0;
}

.by-cookie-preference {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.by-cookie-preference:last-child {
    margin-bottom: 0;
}

.by-cookie-switch {
    position: relative;
    display: inline-block;
    width: 3rem;
    height: 1.5rem;
    flex-shrink: 0;
}

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

.by-cookie-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #e5e7eb;
    border-radius: 1rem;
    transition: background 0.3s ease;
}

.by-cookie-slider::before {
    content: "";
    position: absolute;
    height: 1.25rem;
    width: 1.25rem;
    left: 0.125rem;
    bottom: 0.125rem;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.by-cookie-switch input:checked + .by-cookie-slider {
    background: linear-gradient(90deg, var(--by-cookie-accent-dark) 0%, var(--by-cookie-accent) 100%);
}

.by-cookie-switch input:checked + .by-cookie-slider::before {
    transform: translateX(1.5rem);
}

.by-cookie-switch input:disabled + .by-cookie-slider {
    opacity: 0.65;
    cursor: not-allowed;
}

.by-cookie-preference-label {
    font-size: 0.875rem;
    color: var(--by-cookie-text);
}

.by-cookie-actions {
    display: flex;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--divider-color, #00000014);
}

.by-cookie-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.by-cookie-btn--primary {
    background: linear-gradient(to right, var(--by-cookie-accent-dark) 0%, var(--by-cookie-accent) 50%, var(--by-cookie-accent-dark) 100%);
    background-size: 200% auto;
    color: #fff;
}

.by-cookie-btn--primary:hover {
    background-position: right center;
}

.by-cookie-btn--secondary {
    background: var(--by-cookie-muted-bg);
    color: var(--by-cookie-text);
}

.by-cookie-btn--secondary:hover {
    background: var(--bg-color, #f4f0e9);
    color: var(--by-cookie-heading);
}

.by-cookie-toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    max-width: 20rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(90deg, var(--by-cookie-accent-dark) 0%, var(--by-cookie-accent) 100%);
    color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgb(0 0 0 / 0.12);
    font-size: 0.875rem;
    z-index: 10000;
    opacity: 0;
    transform: translateY(-0.5rem);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.by-cookie-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 640px) {
    .by-cookie-consent {
        bottom: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 1rem 1rem 0 0;
    }

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