/* ==========================================================================
   WP GDPR Compliance & Cookie Suite Stylesheet
   ========================================================================== */

:root {
    --wp-gdpr-primary: #1671d4;
    --wp-gdpr-primary-hover: #0f5bb1;
    --wp-gdpr-dark: #0d2c49;
    --wp-gdpr-bg: #ffffff;
    --wp-gdpr-text: #1f2937;
    --wp-gdpr-muted: #6b7280;
    --wp-gdpr-border: #e5e7eb;
    --wp-gdpr-radius: 12px;
    --wp-gdpr-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* 1. Cookie Banner Layout Variants */
.wp-gdpr-banner {
    position: fixed;
    z-index: 999990;
    background: #ffffff;
    border: 1px solid var(--wp-gdpr-border);
    border-radius: var(--wp-gdpr-radius);
    box-shadow: var(--wp-gdpr-shadow);
    padding: 20px 24px;
    animation: wpGdprSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Position: Full Bottom Bar */
.wp-gdpr-pos-bottom-bar {
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 1150px;
    margin: 0 auto;
}

/* Position: Floating Card Bottom Left */
.wp-gdpr-pos-bottom-left {
    bottom: 20px;
    left: 20px;
    max-width: 440px;
}

/* Position: Floating Card Bottom Right */
.wp-gdpr-pos-bottom-right {
    bottom: 20px;
    right: 20px;
    max-width: 440px;
}

@keyframes wpGdprSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wp-gdpr-banner-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.wp-gdpr-banner-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1 1 320px;
}

.wp-gdpr-banner-icon {
    color: var(--wp-gdpr-primary);
    background: rgba(22, 113, 212, 0.08);
    padding: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wp-gdpr-banner-text-group {
    flex: 1;
}

.wp-gdpr-banner-title {
    margin: 0 0 6px 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--wp-gdpr-dark);
    line-height: 1.3;
}

.wp-gdpr-banner-desc {
    margin: 0;
    font-size: 14px;
    color: var(--wp-gdpr-text);
    line-height: 1.5;
}

.wp-gdpr-link {
    color: var(--wp-gdpr-primary);
    text-decoration: underline;
    font-weight: 500;
    margin-left: 4px;
}

.wp-gdpr-link:hover {
    opacity: 0.85;
}

.wp-gdpr-banner-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* Buttons */
.wp-gdpr-btn {
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wp-gdpr-btn-primary {
    background-color: var(--wp-gdpr-primary);
    color: #ffffff;
}

.wp-gdpr-btn-primary:hover {
    filter: brightness(0.92);
    transform: translateY(-1px);
}

.wp-gdpr-btn-secondary {
    background-color: #f3f4f6;
    color: var(--wp-gdpr-text);
}

.wp-gdpr-btn-secondary:hover {
    background-color: #e5e7eb;
}

.wp-gdpr-btn-outline {
    background-color: transparent;
    color: var(--wp-gdpr-primary);
    border: 1px solid var(--wp-gdpr-primary);
}

.wp-gdpr-btn-outline:hover {
    background-color: rgba(22, 113, 212, 0.05);
}

/* 2. Preferences Modal */
.wp-gdpr-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.wp-gdpr-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(13, 44, 73, 0.6);
    backdrop-filter: blur(4px);
}

.wp-gdpr-modal-card {
    position: relative;
    background: #ffffff;
    width: 100%;
    max-width: 620px;
    border-radius: var(--wp-gdpr-radius);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 2;
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: wpGdprPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes wpGdprPopIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

.wp-gdpr-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--wp-gdpr-dark);
}

.wp-gdpr-modal-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--wp-gdpr-muted);
    cursor: pointer;
    padding: 4px;
}

.wp-gdpr-modal-close-btn:hover {
    color: var(--wp-gdpr-text);
}

.wp-gdpr-modal-body {
    padding: 24px;
    overflow-y: auto;
}

.wp-gdpr-category {
    background: #f9fafb;
    border: 1px solid var(--wp-gdpr-border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.wp-gdpr-category:last-child {
    margin-bottom: 0;
}

.wp-gdpr-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.wp-gdpr-category-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--wp-gdpr-dark);
    display: inline-block;
}

.wp-gdpr-badge-always {
    font-size: 11px;
    background: #e0e7ff;
    color: #3730a3;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    vertical-align: middle;
}

.wp-gdpr-category-desc {
    margin: 0;
    font-size: 13px;
    color: var(--wp-gdpr-muted);
    line-height: 1.5;
}

/* Switch Toggle Button */
.wp-gdpr-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

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

.wp-gdpr-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #d1d5db;
    transition: 0.3s;
    border-radius: 24px;
}

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

input:checked + .wp-gdpr-slider {
    background-color: var(--wp-gdpr-primary);
}

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

.wp-gdpr-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--wp-gdpr-border);
    display: flex;
    justify-content: flex-end;
    background: #f9fafb;
}

/* 3. Floating Re-open Badge */
.wp-gdpr-badge {
    position: fixed;
    bottom: 20px;
    z-index: 999980;
    background: var(--wp-gdpr-dark);
    color: #ffffff;
    border: none;
    border-radius: 30px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    font-family: inherit;
}

.wp-gdpr-badge-pos-bottom-left {
    left: 20px;
}

.wp-gdpr-badge-pos-bottom-right {
    right: 20px;
}

.wp-gdpr-badge:hover {
    background: var(--wp-gdpr-primary);
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wp-gdpr-banner {
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        max-width: 100% !important;
        border-radius: 16px 16px 0 0 !important;
        padding: 16px !important;
    }
    .wp-gdpr-banner-actions {
        width: 100%;
    }
    .wp-gdpr-btn {
        flex: 1;
        text-align: center;
    }
}
