/**
 * GDPR Consent Frontend Styles
 */

/* Cookie Banner Base */
.gdpr-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 999999;
    padding: 15px 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 13px;
    line-height: 1.4;
}

/* Position Variants */
.gdpr-cookie-banner.gdpr-position-bottom {
    bottom: 0;
}

.gdpr-cookie-banner.gdpr-position-top {
    top: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.gdpr-cookie-banner.gdpr-position-center {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);
    max-width: 480px;
    width: 90%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Layout */
.gdpr-cookie-banner-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.gdpr-cookie-banner.gdpr-layout-bar .gdpr-cookie-banner-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

.gdpr-cookie-banner.gdpr-layout-bar .gdpr-cookie-content {
    flex: 1;
    min-width: 280px;
}

.gdpr-cookie-banner.gdpr-layout-box .gdpr-cookie-banner-inner {
    max-width: 400px;
    margin: 0 auto;
}

/* Content - Title inherits color */
.gdpr-cookie-content h3 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: inherit;
}

.gdpr-cookie-content p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

.gdpr-cookie-content a {
    color: inherit;
    text-decoration: underline;
}

/* Buttons */
.gdpr-cookie-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gdpr-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: opacity 0.2s, transform 0.1s;
    white-space: nowrap;
}

.gdpr-btn:hover {
    opacity: 0.85;
}

.gdpr-btn:active {
    transform: scale(0.98);
}

.gdpr-btn-customize {
    background: transparent;
    border: 2px solid currentColor;
    color: inherit;
}

/* Preferences Panel */
.gdpr-cookie-preferences {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.gdpr-cookie-category {
    margin-bottom: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: inherit;
}

.gdpr-cookie-category label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: inherit;
}

.gdpr-cookie-category input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.gdpr-cookie-category input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.gdpr-cookie-category strong {
    font-weight: 600;
    font-size: 13px;
    color: inherit !important;
}

.gdpr-cookie-category p {
    margin: 5px 0 0 24px;
    opacity: 0.75;
    font-size: 11px;
    color: inherit !important;
}

.gdpr-always-active {
    font-size: 10px;
    opacity: 0.7;
    font-weight: normal;
    color: inherit;
}

/* Overlay for center position */
.gdpr-cookie-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

/* Tablet */
@media screen and (max-width: 768px) {
    .gdpr-cookie-banner {
        padding: 12px 15px;
        font-size: 12px;
    }
    
    .gdpr-cookie-banner.gdpr-layout-bar .gdpr-cookie-banner-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .gdpr-cookie-banner.gdpr-layout-bar .gdpr-cookie-content {
        min-width: auto;
    }
    
    .gdpr-cookie-content h3 {
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    .gdpr-cookie-content p {
        font-size: 12px;
    }
    
    .gdpr-cookie-buttons {
        justify-content: stretch;
    }
    
    .gdpr-btn {
        flex: 1;
        text-align: center;
        padding: 10px 12px;
        font-size: 11px;
    }
    
    .gdpr-cookie-banner.gdpr-position-center {
        width: 92%;
        max-height: 85vh;
        overflow-y: auto;
    }
}

/* Mobile */
@media screen and (max-width: 480px) {
    .gdpr-cookie-banner {
        padding: 10px 12px;
    }
    
    .gdpr-cookie-content h3 {
        font-size: 13px;
    }
    
    .gdpr-cookie-content p {
        font-size: 11px;
        line-height: 1.3;
    }
    
    .gdpr-cookie-buttons {
        gap: 6px;
    }
    
    .gdpr-btn {
        padding: 8px 10px;
        font-size: 10px;
    }
    
    .gdpr-cookie-category {
        padding: 8px 10px;
    }
    
    .gdpr-cookie-category label {
        font-size: 12px;
    }
    
    .gdpr-cookie-category p {
        font-size: 10px;
        margin-left: 24px;
    }
    
    .gdpr-cookie-preferences {
        margin-top: 12px;
        padding-top: 12px;
    }
}

/* Animation */
@keyframes gdprSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes gdprSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes gdprFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.gdpr-cookie-banner.gdpr-position-bottom {
    animation: gdprSlideUp 0.3s ease-out;
}

.gdpr-cookie-banner.gdpr-position-top {
    animation: gdprSlideDown 0.3s ease-out;
}

.gdpr-cookie-banner.gdpr-position-center {
    animation: gdprFadeIn 0.3s ease-out;
}

/* Hide class */
.gdpr-cookie-banner.gdpr-hidden {
    display: none !important;
}

/* ==========================================
   CHECKBOX STYLING
   ========================================== */

.gdpr-checkboxes {
    margin: 15px 0;
}

.gdpr-checkboxes p.form-row {
    margin-bottom: 10px;
}

.gdpr-checkboxes label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}

.gdpr-checkboxes input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

.gdpr-checkboxes a {
    color: inherit;
    text-decoration: underline;
}

/* WooCommerce Specific */
.woocommerce .gdpr-checkout-checkboxes {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.woocommerce .gdpr-checkbox {
    margin-bottom: 10px !important;
}

/* Comment Form */
.comment-form-gdpr-privacy {
    margin-top: 10px;
}

.comment-form-gdpr-privacy label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
