/**
 * PrivacyGuard WP Cookie Banner Styles
 * @package PrivacyGuard WP
 */

/* === Reset & Base === */
.pgwp-cb,
.pgwp-cb * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.pgwp-cb {
    position: fixed;
    z-index: 999999;
    font-size: 14px;
    line-height: 1.5;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

/* === Overlay === */
.pgwp-cb-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: -1;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

/* === Layout: Bar Bottom === */
.pgwp-cb-bar-bottom {
    bottom: 0; left: 0; right: 0;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.3);
}
.pgwp-cb-bar-bottom .pgwp-cb-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 32px;
}

/* === Layout: Bar Top === */
.pgwp-cb-bar-top {
    top: 0; left: 0; right: 0;
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}
.pgwp-cb-bar-top .pgwp-cb-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 32px;
}

/* === Layout: Box Center === */
.pgwp-cb-box-center {
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    max-width: 520px;
    width: 92%;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.4);
}
.pgwp-cb-box-center .pgwp-cb-inner {
    padding: 28px 28px 20px;
}

/* === Layout: Box Bottom-Left === */
.pgwp-cb-box-bottom-left {
    bottom: 20px; left: 20px;
    max-width: 420px;
    width: calc(100% - 40px);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.pgwp-cb-box-bottom-left .pgwp-cb-inner {
    padding: 22px 24px;
}

/* === Layout: Box Bottom-Right === */
.pgwp-cb-box-bottom-right {
    bottom: 20px; right: 20px;
    max-width: 420px;
    width: calc(100% - 40px);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.pgwp-cb-box-bottom-right .pgwp-cb-inner {
    padding: 22px 24px;
}

/* === Animations === */
/* Slide */
.pgwp-cb-anim-slide.pgwp-cb-bar-bottom { transform: translateY(100%); }
.pgwp-cb-anim-slide.pgwp-cb-bar-top { transform: translateY(-100%); }
.pgwp-cb-anim-slide.pgwp-cb-bar-bottom.pgwp-cb-visible,
.pgwp-cb-anim-slide.pgwp-cb-bar-top.pgwp-cb-visible { transform: translateY(0); }

.pgwp-cb-anim-slide.pgwp-cb-box-bottom-left { transform: translateY(40px); opacity: 0; }
.pgwp-cb-anim-slide.pgwp-cb-box-bottom-right { transform: translateY(40px); opacity: 0; }
.pgwp-cb-anim-slide.pgwp-cb-box-center { transform: translate(-50%, -45%); opacity: 0; }
.pgwp-cb-anim-slide.pgwp-cb-box-bottom-left.pgwp-cb-visible,
.pgwp-cb-anim-slide.pgwp-cb-box-bottom-right.pgwp-cb-visible { transform: translateY(0); opacity: 1; }
.pgwp-cb-anim-slide.pgwp-cb-box-center.pgwp-cb-visible { transform: translate(-50%, -50%); opacity: 1; }

/* Fade */
.pgwp-cb-anim-fade { opacity: 0; }
.pgwp-cb-anim-fade.pgwp-cb-visible { opacity: 1; }

/* Hiding */
.pgwp-cb-hiding { opacity: 0 !important; transform: translateY(20px); }
.pgwp-cb-anim-slide.pgwp-cb-bar-bottom.pgwp-cb-hiding { transform: translateY(100%); }
.pgwp-cb-anim-slide.pgwp-cb-bar-top.pgwp-cb-hiding { transform: translateY(-100%); }

/* === Content === */
.pgwp-cb-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.pgwp-cb-text {
    font-size: 14px;
    opacity: 0.88;
    margin-bottom: 12px;
    line-height: 1.6;
}

.pgwp-cb-links {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 13px;
}
.pgwp-cb-links a {
    text-decoration: underline;
    text-underline-offset: 2px;
    opacity: 0.8;
    transition: opacity 0.15s;
}
.pgwp-cb-links a:hover { opacity: 1; }

/* === Buttons === */
.pgwp-cb-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pgwp-cb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.2s, opacity 0.15s;
    min-width: 100px;
    text-align: center;
}
.pgwp-cb-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.pgwp-cb-btn:active {
    transform: translateY(0);
}

.pgwp-cb-btn-accept {
    font-size: 15px;
    padding: 12px 28px;
}

.pgwp-cb-btn-decline {
    background: rgba(255,255,255,0.12);
    color: inherit;
    border: 1px solid rgba(255,255,255,0.2);
}
.pgwp-cb-btn-decline:hover {
    background: rgba(255,255,255,0.18);
}

.pgwp-cb-btn-settings {
    background: transparent;
    color: inherit;
    opacity: 0.7;
    font-weight: 400;
    text-decoration: underline;
    text-underline-offset: 2px;
    min-width: auto;
    padding: 10px 12px;
}
.pgwp-cb-btn-settings:hover {
    opacity: 1;
    box-shadow: none;
    transform: none;
}

.pgwp-cb-btn-save {
    font-size: 15px;
    padding: 12px 28px;
}

/* === Categories === */
.pgwp-cb-categories {
    margin: 16px 0;
    padding: 16px;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    max-height: 280px;
    overflow-y: auto;
}

.pgwp-cb-cat {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.pgwp-cb-cat:last-child { border-bottom: none; }

.pgwp-cb-cat-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

.pgwp-cb-cat-check {
    width: 18px;
    height: 18px;
    accent-color: #4CAF50;
    cursor: pointer;
    flex-shrink: 0;
}
.pgwp-cb-cat-check:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.pgwp-cb-cat-name { flex: 1; }

.pgwp-cb-cat-badge {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 8px;
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
    font-weight: 600;
    opacity: 0.7;
}

.pgwp-cb-cat-desc {
    font-size: 12px;
    opacity: 0.6;
    margin-top: 4px;
    margin-left: 28px;
    line-height: 1.5;
}

/* === Revoke Button === */
.pgwp-cb-revoke {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 99998;
    border: none;
    border-radius: 24px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    transition: transform 0.15s, box-shadow 0.2s;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    opacity: 0.85;
}
.pgwp-cb-revoke:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.3);
    opacity: 1;
}

/* === Service Blocking (2-Click) === */
.pgwp-blocked {
    position: relative;
    background: #f1f5f9;
    border: 2px dashed #94a3b8;
    border-radius: 8px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    color: #475569;
    font-size: 14px;
}
.pgwp-blocked::before {
    content: '🔒';
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
}

/* === Legal Page Styles === */
.pgwp-legal {
    margin: 1.5em 0;
    line-height: 1.7;
}
.pgwp-legal h2 { font-size: 1.6em; margin: 1.2em 0 0.5em; }
.pgwp-legal h3 { font-size: 1.25em; margin: 1em 0 0.4em; }
.pgwp-legal h4 { font-size: 1.1em; margin: 0.8em 0 0.3em; }
.pgwp-legal p { margin-bottom: 0.8em; }
.pgwp-legal ul, .pgwp-legal ol { margin: 0.6em 0 0.6em 1.8em; }
.pgwp-legal li { margin-bottom: 0.3em; }
.pgwp-legal-empty { color: #94a3b8; font-style: italic; }

/* === Responsive === */
@media (max-width: 640px) {
    .pgwp-cb-bar-bottom .pgwp-cb-inner,
    .pgwp-cb-bar-top .pgwp-cb-inner {
        padding: 18px 16px;
    }
    .pgwp-cb-box-center {
        width: 95%;
        max-width: none;
    }
    .pgwp-cb-box-bottom-left,
    .pgwp-cb-box-bottom-right {
        left: 10px; right: 10px;
        max-width: none;
        width: calc(100% - 20px);
    }
    .pgwp-cb-buttons {
        flex-direction: column;
    }
    .pgwp-cb-btn { width: 100%; }
    .pgwp-cb-btn-settings {
        text-align: center;
    }
    .pgwp-cb-categories {
        max-height: 200px;
    }
    .pgwp-cb-title { font-size: 16px; }
    .pgwp-cb-text { font-size: 13px; }
    .pgwp-cb-revoke {
        left: 10px;
        bottom: 10px;
        font-size: 12px;
        padding: 6px 14px;
    }
}

/* === Print: hide everything === */
@media print {
    .pgwp-cb, .pgwp-cb-revoke, .pgwp-cb-overlay { display: none !important; }
}
