/**
 * Podpage GDPR Cookie Banner Styles
 *
 * Responsive, accessible cookie banner with dark mode support
 */

/* Banner Container */
#gdpr-cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.dark-mode #gdpr-cookie-banner {
    background: #1a1a1a;
    border-top-color: #333;
    color: #e0e0e0;
}

/* Banner Content */
.gdpr-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.gdpr-banner-text {
    flex: 1;
    min-width: 250px;
}

.gdpr-banner-text p {
    margin: 0 0 0.5rem 0;
}

.gdpr-banner-text a {
    color: #007bff;
    text-decoration: underline;
}

.dark-mode .gdpr-banner-text a {
    color: #66b3ff;
}

.gdpr-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Buttons */
.gdpr-btn {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.gdpr-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.gdpr-accept-all {
    background: #007bff;
    color: #ffffff;
}

.gdpr-accept-all:hover {
    background: #0056b3;
}

.gdpr-reject-all {
    background: #6c757d;
    color: #ffffff;
}

.gdpr-reject-all:hover {
    background: #545b62;
}

.gdpr-customize {
    background: transparent;
    color: #007bff;
    border: 1px solid #007bff;
}

.gdpr-customize:hover {
    background: #f8f9fa;
}

.dark-mode .gdpr-customize {
    color: #66b3ff;
    border-color: #66b3ff;
}

.dark-mode .gdpr-customize:hover {
    background: #2a2a2a;
}

/* Modal */
#gdpr-preferences-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    padding: 2rem 1rem;
}

#gdpr-preferences-modal.show {
    display: block;
}

.gdpr-modal-content {
    max-width: 600px;
    margin: 2rem auto;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 2rem;
    position: relative;
}

.dark-mode .gdpr-modal-content {
    background: #1a1a1a;
    color: #e0e0e0;
}

.gdpr-modal-header {
    margin-bottom: 1.5rem;
}

.gdpr-modal-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.gdpr-modal-header p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}

.dark-mode .gdpr-modal-header p {
    color: #999;
}

.gdpr-close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #6c757d;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.gdpr-close-modal:hover {
    background: #f8f9fa;
    color: #333;
}

.dark-mode .gdpr-close-modal {
    color: #999;
}

.dark-mode .gdpr-close-modal:hover {
    background: #2a2a2a;
    color: #e0e0e0;
}

/* Preferences Form */
.gdpr-preferences-form {
    margin-bottom: 1.5rem;
}

.gdpr-preference-item {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #f8f9fa;
}

.dark-mode .gdpr-preference-item {
    border-color: #333;
    background: #2a2a2a;
}

.gdpr-preference-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.gdpr-preference-header label {
    font-weight: 600;
    margin-left: 0.5rem;
    cursor: pointer;
    flex: 1;
}

.gdpr-preference-header input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.gdpr-preference-description {
    font-size: 13px;
    color: #6c757d;
    margin-left: 1.75rem;
}

.dark-mode .gdpr-preference-description {
    color: #999;
}

.gdpr-preference-item.disabled {
    opacity: 0.6;
}

.gdpr-preference-item.disabled .gdpr-preference-header input[type="checkbox"] {
    cursor: not-allowed;
}

/* Modal Actions */
.gdpr-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.dark-mode .gdpr-modal-actions {
    border-top-color: #333;
}

.gdpr-save-preferences {
    background: #007bff;
    color: #ffffff;
    padding: 0.625rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gdpr-save-preferences:hover {
    background: #0056b3;
}

/* Responsive Design */
@media (max-width: 768px) {
    #gdpr-cookie-banner {
        padding: 1rem;
    }

    .gdpr-banner-content {
        flex-direction: column;
        align-items: stretch;
    }

    .gdpr-banner-actions {
        width: 100%;
        flex-direction: column;
    }

    .gdpr-btn {
        width: 100%;
    }

    .gdpr-modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }

    .gdpr-modal-header h2 {
        font-size: 1.25rem;
    }
}

/* Accessibility */
#gdpr-cookie-banner[aria-hidden="true"],
#gdpr-preferences-modal[aria-hidden="true"] {
    display: none !important;
}

/* Animation */
#gdpr-cookie-banner {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

#gdpr-preferences-modal.show .gdpr-modal-content {
    animation: fadeIn 0.2s ease-out;
}

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

/* Sticky Footer (shown when cookies are declined) */
#gdpr-sticky-footer {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff3cd;
    border-top: 1px solid #ffc107;
    padding: 0.75rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.dark-mode #gdpr-sticky-footer {
    background: #3d2f00;
    border-top-color: #ffc107;
    color: #ffc107;
}

.gdpr-sticky-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.gdpr-sticky-footer-text {
    flex: 1;
}

.gdpr-sticky-footer-text a {
    color: #856404;
    text-decoration: underline;
    font-weight: 500;
    margin-left: 0.5rem;
}

.dark-mode .gdpr-sticky-footer-text a {
    color: #ffc107;
}

.gdpr-sticky-footer-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    color: #856404;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.gdpr-sticky-footer-close:hover {
    background: rgba(133, 100, 4, 0.1);
    color: #664d03;
}

.dark-mode .gdpr-sticky-footer-close {
    color: #ffc107;
}

.dark-mode .gdpr-sticky-footer-close:hover {
    background: rgba(255, 193, 7, 0.1);
    color: #ffd54f;
}

/* Ensure sticky footer doesn't overlap main banner */
#gdpr-cookie-banner[aria-hidden="false"] ~ #gdpr-sticky-footer,
#gdpr-cookie-banner:not([aria-hidden="true"]) ~ #gdpr-sticky-footer {
    display: none !important;
}

/* Responsive adjustments for sticky footer */
@media (max-width: 768px) {
    #gdpr-sticky-footer {
        padding: 0.625rem 0.75rem;
        font-size: 12px;
    }

    .gdpr-sticky-footer-content {
        flex-wrap: wrap;
    }

    .gdpr-sticky-footer-text {
        flex-basis: 100%;
        margin-bottom: 0.25rem;
    }

    .gdpr-sticky-footer-close {
        align-self: flex-start;
    }
}
