/**
 * CookieGuard Consent Manager Stylesheet
 */

#cookieguard-banner-root {
    position: relative;
    z-index: 999999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cookieguard-banner-wrap {
    box-shadow: 0 -4px 35px rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.cookieguard-banner-wrap * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.cg-pos-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 24px 32px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.cg-pos-top {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 24px 32px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.cookieguard-overlay-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(5px);
    z-index: 999999998;
}

.cg-pos-modal-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    border-radius: 20px;
    padding: 36px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 999999999;
}

.cg-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cg-text-section {
    flex: 1;
    min-width: 280px;
}

.cg-title {
    font-size: 18px;
    font-weight: 750;
    line-height: 1.3;
    margin-bottom: 8px;
}

.cg-desc {
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.85;
}

.cg-desc-small {
    font-size: 13px;
    line-height: 1.4;
    opacity: 0.75;
    margin-bottom: 18px;
}

.cg-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.cg-buttons-right {
    justify-content: flex-end;
    margin-top: 24px;
}

.cg-btn {
    border: none;
    border-radius: 10px;
    padding: 11px 22px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.cg-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.cg-btn-primary {
    font-weight: 700;
}

.cg-btn-secondary {
    background-color: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.cg-btn-outline {
    background-color: transparent;
    border: 1.5px solid;
}

.cg-container-prefs {
    width: 100%;
}

.cg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.cg-back-link {
    background: none;
    border: none;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
}

.cg-pref-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cg-pref-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    gap: 16px;
}

.cg-pref-info {
    flex: 1;
}

.cg-pref-name {
    display: block;
    font-size: 14px;
    font-weight: 750;
    margin-bottom: 2px;
}

.cg-pref-desc {
    display: block;
    font-size: 12px;
    line-height: 1.4;
    opacity: 0.75;
}

.cg-switch-wrap {
    display: flex;
    align-items: center;
}

.cg-switch {
    position: relative;
    width: 44px;
    height: 22px;
    appearance: none;
    background-color: #cbd5e1;
    outline: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.cg-switch:checked {
    background-color: #4f46e5;
}

.cg-switch:disabled {
    background-color: #94a3b8;
    opacity: 0.6;
    cursor: not-allowed;
}

.cg-switch::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    background-color: #ffffff;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.cg-switch:checked::before {
    transform: translateX(22px);
}

@media (max-width: 768px) {
    .cg-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .cg-buttons {
        width: 100%;
        justify-content: space-between;
    }
    .cg-btn {
        flex: 1;
        text-align: center;
        padding: 12px 10px;
        font-size: 13px;
    }
    .cg-pos-bottom, .cg-pos-top {
        padding: 16px 20px;
    }
}

/* CookieGuard Policy Modal Popups Styles */
.cookieguard-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000000000;
    display: none;
}

.cg-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
}

.cg-modal-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 650px;
    max-height: 80vh;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: cgModalEntry 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.cg-modal-title {
    font-size: 18px;
    font-weight: 750;
    margin: 0;
}

.cg-modal-close-x {
    background: none;
    border: none;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    transition: opacity 0.2s;
    line-height: 1;
}

.cg-modal-close-x:hover {
    opacity: 1;
}

.cg-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
}

.cg-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid;
    display: flex;
    justify-content: flex-end;
}

#cookieguard-floating-footer-trigger {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ffffff;
    color: #4f46e5;
    border: 1.5px solid #4f46e5;
    border-radius: 50px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99999999;
    display: none; /* Controlled dynamically by JS init/hide/show */
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#cookieguard-floating-footer-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
    background: #4f46e5;
    color: #ffffff;
}

#cookieguard-floating-footer-trigger svg {
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}
