/* EU Cookie Consent - Frontend Banner Styles */

:root {
    --eucc-primary: #1a56db;
    --eucc-primary-hover: #1e40af;
    --eucc-text: #1f2937;
    --eucc-text-light: #6b7280;
    --eucc-bg: #ffffff;
    --eucc-border: #e5e7eb;
    --eucc-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
    --eucc-radius: 12px;
    --eucc-z: 999999;
}

/* Banner */
.eucc-banner {
    position: fixed;
    z-index: var(--eucc-z);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--eucc-text);
    box-sizing: border-box;
}

.eucc-banner *, .eucc-banner *::before, .eucc-banner *::after,
.eucc-preferences *, .eucc-preferences *::before, .eucc-preferences *::after {
    box-sizing: border-box;
}

.eucc-banner--bottom {
    bottom: 0;
    left: 0;
    right: 0;
}

.eucc-banner--bottom-left {
    bottom: 20px;
    left: 20px;
    max-width: 420px;
}

.eucc-banner--bottom-right {
    bottom: 20px;
    right: 20px;
    max-width: 420px;
}

.eucc-banner--center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 560px;
    width: calc(100% - 40px);
}

.eucc-banner__inner {
    background: var(--eucc-bg);
    border: 1px solid var(--eucc-border);
    box-shadow: var(--eucc-shadow);
    padding: 20px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.eucc-banner--bottom .eucc-banner__inner {
    border-radius: 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
}

.eucc-banner--bottom-left .eucc-banner__inner,
.eucc-banner--bottom-right .eucc-banner__inner,
.eucc-banner--center .eucc-banner__inner {
    border-radius: var(--eucc-radius);
}

.eucc-banner__logo img {
    display: block;
    max-width: 120px;
    height: auto;
}

.eucc-banner__content {
    flex: 1;
    min-width: 200px;
}

.eucc-banner__title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    color: var(--eucc-text);
}

.eucc-banner__description {
    margin: 0;
    font-size: 13px;
    color: var(--eucc-text-light);
}

.eucc-banner__description a {
    color: var(--eucc-primary);
    text-decoration: underline;
}

.eucc-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* Buttons */
.eucc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1.2;
}

.eucc-btn--primary {
    background: var(--eucc-primary);
    color: #fff;
    border-color: var(--eucc-primary);
}

.eucc-btn--primary:hover {
    background: var(--eucc-primary-hover);
    border-color: var(--eucc-primary-hover);
}

.eucc-btn--secondary {
    background: transparent;
    color: var(--eucc-text-light);
    border-color: var(--eucc-border);
}

.eucc-btn--secondary:hover {
    background: #f9fafb;
    color: var(--eucc-text);
}

.eucc-btn--outline {
    background: transparent;
    color: var(--eucc-primary);
    border-color: var(--eucc-primary);
}

.eucc-btn--outline:hover {
    background: rgba(26, 86, 219, 0.06);
}

/* Preferences Modal */
.eucc-preferences {
    position: fixed;
    inset: 0;
    z-index: calc(var(--eucc-z) + 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 14px;
    color: var(--eucc-text);
}

.eucc-preferences__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.eucc-preferences__modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--eucc-bg);
    border-radius: var(--eucc-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: calc(100% - 40px);
    max-width: 560px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.eucc-preferences__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--eucc-border);
}

.eucc-preferences__header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.eucc-preferences__close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--eucc-text-light);
    border-radius: 6px;
    display: flex;
}

.eucc-preferences__close:hover {
    background: #f3f4f6;
    color: var(--eucc-text);
}

.eucc-preferences__body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.eucc-preferences__intro {
    margin: 0 0 16px;
    color: var(--eucc-text-light);
    font-size: 13px;
}

.eucc-pref-item {
    border: 1px solid var(--eucc-border);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.eucc-pref-item__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 16px;
    gap: 12px;
}

.eucc-pref-item__info h3 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
}

.eucc-pref-item__info p {
    margin: 0;
    font-size: 12px;
    color: var(--eucc-text-light);
    line-height: 1.4;
}

.eucc-pref-item__always {
    font-size: 12px;
    font-weight: 500;
    color: var(--eucc-primary);
    white-space: nowrap;
}

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

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

.eucc-switch__slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #d1d5db;
    border-radius: 24px;
    transition: background 0.2s;
}

.eucc-switch__slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.eucc-switch input:checked + .eucc-switch__slider {
    background: var(--eucc-primary);
}

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

.eucc-preferences__footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid var(--eucc-border);
}

/* Floating Button */
.eucc-floating-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: calc(var(--eucc-z) - 1);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--eucc-bg);
    border: 1px solid var(--eucc-border);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--eucc-primary);
    transition: box-shadow 0.15s, transform 0.15s;
}

.eucc-floating-btn:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
}

/* Cookie Policy Page */
.eucc-policy {
    font-family: inherit;
    line-height: 1.6;
}

.eucc-policy h2 {
    font-size: 1.4em;
    margin-top: 1.5em;
    border-bottom: 1px solid var(--eucc-border, #e5e7eb);
    padding-bottom: 0.3em;
}

.eucc-policy h3 {
    font-size: 1.1em;
    margin-top: 1em;
}

.eucc-policy-updated {
    color: var(--eucc-text-light, #6b7280);
    font-size: 0.9em;
}

.eucc-policy-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 24px;
    font-size: 0.9em;
}

.eucc-policy-table th,
.eucc-policy-table td {
    border: 1px solid var(--eucc-border, #e5e7eb);
    padding: 8px 12px;
    text-align: left;
}

.eucc-policy-table th {
    background: #f9fafb;
    font-weight: 600;
}

.eucc-policy-table code {
    font-size: 0.85em;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
}

.eucc-policy-manage {
    margin-top: 2em;
    padding-top: 1em;
    border-top: 1px solid var(--eucc-border, #e5e7eb);
}

.eucc-manage-btn {
    display: inline-flex;
    padding: 10px 20px;
    background: var(--eucc-primary, #1a56db);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.eucc-manage-btn:hover {
    opacity: 0.9;
}

body.eucc-banner-visible {
    /* Optional: prevent scroll behind center popup */
}

/* Responsive */
@media (max-width: 640px) {
    .eucc-banner__inner {
        flex-direction: column;
        align-items: stretch;
    }

    .eucc-banner__actions {
        flex-direction: column;
    }

    .eucc-btn {
        width: 100%;
    }

    .eucc-banner--bottom-left,
    .eucc-banner--bottom-right {
        left: 10px;
        right: 10px;
        max-width: none;
    }

    .eucc-policy-table {
        font-size: 0.8em;
    }

    .eucc-policy-table th,
    .eucc-policy-table td {
        padding: 6px 8px;
    }
}
