/* Privacy Manager (PM) Banner & Modal Stylesheet */

:root {
    --pm-bg: rgba(255, 253, 248, 0.94);
    --pm-border: #e9e3d5;
    --pm-text: #4a5048;
    --pm-text-muted: #727a6f;
    --pm-accent: #819b7d;
    --pm-accent-hover: #678063;
    --pm-accent-light: #e6ede4;
    --pm-shadow: 0 12px 40px -10px rgba(91, 96, 88, 0.12);
}

/* Banner container */
.pm-banner-wrapper {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    width: 90%;
    max-width: 1000px;
    background: var(--pm-bg);
    border: 1px solid var(--pm-border);
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: var(--pm-shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
}

.pm-banner-wrapper.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Left content side */
.pm-banner-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.pm-banner-mascot {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
}

.pm-banner-mascot svg {
    width: 100%;
    height: 100%;
    display: block;
}

.pm-banner-text-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pm-banner-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--pm-text);
    margin: 0;
}

.pm-banner-desc {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--pm-text-muted);
    margin: 0;
}

.pm-banner-desc a {
    color: var(--pm-accent);
    text-decoration: underline;
    font-weight: 500;
}

/* Right button actions side */
.pm-banner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Common Button Base */
.pm-btn {
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Button styles */
.pm-btn-primary {
    background-color: var(--pm-accent);
    color: #ffffff;
    border: 1px solid var(--pm-accent);
}

.pm-btn-primary:hover {
    background-color: var(--pm-accent-hover);
    border-color: var(--pm-accent-hover);
    transform: translateY(-1px);
}

.pm-btn-secondary {
    background-color: transparent;
    color: var(--pm-text);
    border: 1px solid var(--pm-border);
}

.pm-btn-secondary:hover {
    background-color: rgba(91, 96, 88, 0.04);
    border-color: var(--pm-text-muted);
}

.pm-btn-link {
    background-color: transparent;
    color: var(--pm-accent);
    border: 1px solid var(--pm-accent);
}

.pm-btn-link:hover {
    background-color: var(--pm-accent-light);
    transform: translateY(-1px);
}

/* Privacy Modal Overlay */
.pm-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(26, 28, 25, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pm-modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* Modal Content Card */
.pm-modal-card {
    background: var(--pm-bg);
    border: 1px solid var(--pm-border);
    border-radius: 20px;
    width: 90%;
    max-width: 640px;
    max-height: 85vh;
    box-shadow: 0 20px 50px -15px rgba(26, 28, 25, 0.2);
    display: flex;
    flex-direction: column;
    transform: scale(0.92) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.pm-modal-overlay.show .pm-modal-card {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.pm-modal-header {
    padding: 24px 28px 16px 28px;
    border-bottom: 1px solid var(--pm-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pm-modal-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--pm-text);
    margin: 0;
}

.pm-modal-close {
    background: transparent;
    border: none;
    color: var(--pm-text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
}

.pm-modal-close:hover {
    background-color: rgba(91, 96, 88, 0.06);
    color: var(--pm-text);
}

/* Modal Body */
.pm-modal-body {
    padding: 20px 28px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pm-modal-intro {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--pm-text-muted);
    margin: 0;
}

/* Category Item */
.pm-category-item {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--pm-border);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pm-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pm-category-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pm-category-title {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--pm-text);
    margin: 0;
}

.pm-category-desc {
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--pm-text-muted);
    margin: 0;
}

/* iOS Toggle Switch styling */
.pm-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

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

.pm-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #d8d3c9;
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 34px;
}

.pm-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pm-switch input:checked + .pm-slider {
    background-color: var(--pm-accent);
}

.pm-switch input:checked + .pm-slider:before {
    transform: translateX(22px);
}

.pm-switch input:disabled + .pm-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.pm-status-always {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--pm-accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Modal Footer */
.pm-modal-footer {
    padding: 16px 28px 24px 28px;
    border-top: 1px solid var(--pm-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Trigger settings class */
.pm-settings-trigger {
    cursor: pointer;
}

/* Responsiveness overrides */
@media (max-width: 768px) {
    .pm-banner-wrapper {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        bottom: 16px;
        gap: 16px;
    }
    
    .pm-banner-content {
        align-items: flex-start;
        gap: 14px;
    }
    
    .pm-banner-mascot {
        width: 50px;
        height: 50px;
    }
    
    .pm-banner-actions {
        justify-content: flex-end;
        width: 100%;
    }
    
    .pm-btn {
        flex: 1;
        padding: 10px 12px;
        font-size: 0.8rem;
    }
    
    .pm-modal-card {
        max-height: 90vh;
    }
    
    .pm-modal-header,
    .pm-modal-body,
    .pm-modal-footer {
        padding: 16px 20px;
    }
    
    .pm-modal-title {
        font-size: 1.25rem;
    }
}
