/* =========================================
   GDPR Cookie Consent — Frontend Styles
   ========================================= */

/* Reset for our elements */
.gdpr-cc-banner *,
.gdpr-cc-modal *,
.gdpr-cc-revoke-btn * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ---- BANNER: Common ---- */
.gdpr-cc-banner {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.gdpr-cc-banner.gdpr-cc-hidden {
    pointer-events: none;
}

/* ---- BANNER: Bar Mode ---- */
.gdpr-cc-bar {
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--gdpr-bg, #ffffff);
    color: var(--gdpr-text, #1f2937);
    box-shadow: 0 -2px 20px rgba(0,0,0,0.08);
    border-top: 1px solid rgba(0,0,0,0.06);
}

.gdpr-cc-bar .gdpr-cc-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.gdpr-cc-bar .gdpr-cc-text {
    flex: 1;
    min-width: 280px;
    font-size: 13px;
    opacity: 0.9;
}

.gdpr-cc-bar.gdpr-cc-hidden {
    transform: translateY(100%);
    opacity: 0;
}

/* ---- BANNER: Floating Mode ---- */
.gdpr-cc-floating {
    bottom: 20px;
    left: 20px;
    width: 360px;
    max-width: calc(100vw - 40px);
    background: var(--gdpr-bg, #ffffff);
    color: var(--gdpr-text, #1f2937);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.06);
}

.gdpr-cc-floating .gdpr-cc-banner-inner {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.gdpr-cc-floating .gdpr-cc-text {
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.6;
}

.gdpr-cc-floating.gdpr-cc-hidden {
    transform: translateY(20px) scale(0.95);
    opacity: 0;
}

/* ---- Buttons ---- */
.gdpr-cc-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.gdpr-cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
}

.gdpr-cc-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.gdpr-cc-btn:active {
    transform: translateY(0);
}

.gdpr-cc-btn-accept {
    background: var(--gdpr-primary, #2563eb);
    color: #ffffff;
}

.gdpr-cc-btn-accept:hover {
    background: var(--gdpr-primary-hover, #1d4ed8);
    color: #ffffff;
}

.gdpr-cc-btn-reject {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.gdpr-cc-btn-reject:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.gdpr-cc-btn-details {
    background: transparent;
    color: var(--gdpr-primary, #2563eb);
    border: 1px solid transparent;
    padding: 8px 12px;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.gdpr-cc-btn-details:hover {
    background: rgba(37, 99, 235, 0.06);
    box-shadow: none;
    transform: none;
}

/* ---- MODAL ---- */
.gdpr-cc-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    animation: gdpr-cc-fade-in 0.25s ease;
}

@keyframes gdpr-cc-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gdpr-cc-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
}

.gdpr-cc-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    max-width: 560px;
    width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0,0,0,0.2);
    animation: gdpr-cc-slide-up 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes gdpr-cc-slide-up {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.gdpr-cc-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s;
}

.gdpr-cc-modal-close:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.gdpr-cc-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
    padding-right: 40px;
}

.gdpr-cc-modal-desc {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* ---- Categories ---- */
.gdpr-cc-categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.gdpr-cc-category {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.gdpr-cc-category:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.gdpr-cc-category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}

.gdpr-cc-category-info {
    flex: 1;
}

.gdpr-cc-category-info strong {
    font-size: 14px;
    color: #111827;
}

.gdpr-cc-category-info p {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.gdpr-cc-always-on {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #16a34a;
    background: #f0fdf4;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
}

/* Toggle switch */
.gdpr-cc-category-toggle {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}

.gdpr-cc-category-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.gdpr-cc-cat-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    border-radius: 24px;
    transition: 0.3s;
}

.gdpr-cc-cat-slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.gdpr-cc-category-toggle input:checked + .gdpr-cc-cat-slider {
    background-color: var(--gdpr-primary, #2563eb);
}

.gdpr-cc-category-toggle input:checked + .gdpr-cc-cat-slider:before {
    transform: translateX(18px);
}

.gdpr-cc-category-toggle input:disabled + .gdpr-cc-cat-slider {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Expand button */
.gdpr-cc-category-expand {
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 12px;
    padding: 4px;
    transition: transform 0.2s, color 0.2s;
    flex-shrink: 0;
}

.gdpr-cc-category-expand:hover {
    color: #6b7280;
}

.gdpr-cc-category-expand.gdpr-cc-expanded {
    transform: rotate(180deg);
}

/* Category details */
.gdpr-cc-category-details {
    padding: 0 16px 14px 70px;
    border-top: 1px solid #f3f4f6;
    background: #fafafa;
}

.gdpr-cc-category-details ul {
    list-style: none;
    padding: 12px 0 0;
}

.gdpr-cc-category-details li {
    font-size: 12px;
    color: #4b5563;
    padding: 6px 0;
    border-bottom: 1px solid #f3f4f6;
}

.gdpr-cc-category-details li:last-child {
    border-bottom: none;
}

.gdpr-cc-no-scripts {
    font-size: 12px;
    color: #9ca3af;
    font-style: italic;
    padding-top: 12px;
}

/* Modal buttons */
.gdpr-cc-modal-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---- Revoke Button ---- */
.gdpr-cc-revoke-btn {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 999998;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #ffffff;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.2s;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    opacity: 0.7;
}

.gdpr-cc-revoke-btn:hover {
    opacity: 1;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    color: #374151;
}

.gdpr-cc-revoke-btn svg {
    flex-shrink: 0;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .gdpr-cc-bar .gdpr-cc-banner-inner {
        flex-direction: column;
        text-align: center;
        padding: 14px 16px;
        gap: 12px;
    }

    .gdpr-cc-bar .gdpr-cc-buttons {
        justify-content: center;
        width: 100%;
    }

    .gdpr-cc-floating {
        left: 10px;
        right: 10px;
        bottom: 10px;
        width: auto;
    }

    .gdpr-cc-modal-content {
        padding: 24px 20px;
        max-height: 90vh;
        border-radius: 12px;
    }

    .gdpr-cc-category-details {
        padding-left: 16px;
    }

    .gdpr-cc-modal-buttons {
        flex-direction: column;
    }

    .gdpr-cc-modal-buttons .gdpr-cc-btn {
        width: 100%;
    }

    .gdpr-cc-revoke-btn .gdpr-cc-revoke-label {
        display: none;
    }

    .gdpr-cc-revoke-btn {
        padding: 10px;
        border-radius: 50%;
    }
}
