/* CookieList Pro - Frontend Styles */

:root {
    --cl-primary: #6366f1;
    --cl-text: #333333;
    --cl-bg: #ffffff;
    --cl-radius: 12px;
    --cl-font-size: 14px;
    --cl-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --cl-overlay-opacity: 0.8;
    --cl-btn-primary-bg: #6366f1;
    --cl-btn-primary-text: #ffffff;
    --cl-btn-secondary-bg: #e5e7eb;
    --cl-btn-secondary-text: #1f2937;
}

/* Base Banner Styles */
.cookielist-banner {
    font-family: var(--cl-font-family);
    font-size: var(--cl-font-size);
    color: var(--cl-text);
    background: var(--cl-bg);
    z-index: 999999;
    animation: slideIn 0.3s ease;
}

.cookielist-banner * {
    box-sizing: border-box;
}

/* Layout: Bar */
.cookielist-banner.cookielist-bar {
    position: fixed;
    left: 0;
    right: 0;
    padding: 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.cookielist-banner.cookielist-bar.cookielist-bottom {
    bottom: 0;
    animation: slideUp 0.3s ease;
}

.cookielist-banner.cookielist-bar.cookielist-top {
    top: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    animation: slideDown 0.3s ease;
}

.cookielist-banner.cookielist-bar .cookielist-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* Layout: Box */
.cookielist-banner.cookielist-box {
    position: fixed;
    width: 450px;
    max-width: calc(100vw - 40px);
    margin: 20px;
    padding: 25px;
    border-radius: var(--cl-radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.cookielist-banner.cookielist-box.cookielist-bottom-left {
    bottom: 0;
    left: 0;
    animation: slideInLeft 0.3s ease;
}

.cookielist-banner.cookielist-box.cookielist-bottom-right {
    bottom: 0;
    right: 0;
    animation: slideInRight 0.3s ease;
}

/* Layout: Popup */
.cookielist-banner.cookielist-popup {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    max-width: calc(100vw - 40px);
    padding: 30px;
    border-radius: var(--cl-radius);
    box-shadow: 0 4px 30px rgba(0,0,0,0.2);
    animation: slideUp 0.3s ease;
}

.cookielist-banner.cookielist-popup.cookielist-center {
    top: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
    animation: fadeInScale 0.3s ease;
}

/* Banner Content */
.cookielist-banner-content {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex: 1;
}

.cookielist-banner-icon {
    font-size: 32px;
    line-height: 1;
}

.cookielist-banner-text {
    flex: 1;
}

.cookielist-banner-text h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--cl-text);
}

.cookielist-banner-text p {
    margin: 0 0 10px 0;
    line-height: 1.5;
    color: var(--cl-text);
    opacity: 0.8;
}

.cookielist-banner-links {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.cookielist-banner-links a {
    color: var(--cl-primary);
    text-decoration: none;
    font-size: 13px;
    position: relative;
    padding-bottom: 1px;
    border-bottom: 1px solid var(--cl-primary);
    transition: opacity 0.2s ease;
}

.cookielist-banner-links a:hover {
    opacity: 0.8;
}

/* Banner Actions */
.cookielist-banner-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Buttons */
.cookielist-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-family: var(--cl-font-family);
}

.cookielist-btn:hover {
    transform: translateY(-1px);
}

.cookielist-btn-accept {
    background: var(--cl-btn-primary-bg, var(--cl-primary));
    color: var(--cl-btn-primary-text, white);
}

.cookielist-btn-accept:hover {
    filter: brightness(0.9);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.cookielist-btn-settings {
    background: var(--cl-btn-secondary-bg, rgba(0, 0, 0, 0.05));
    color: var(--cl-btn-secondary-text, var(--cl-text));
}

.cookielist-btn-settings:hover {
    filter: brightness(0.95);
}

/* Settings Modal */
.cookielist-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, var(--cl-overlay-opacity, 0.5));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    animation: fadeIn 0.3s ease;
}

.cookielist-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.cookielist-modal-content {
    position: relative;
    background: var(--cl-bg);
    border-radius: var(--cl-radius);
    width: 700px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    overflow: auto;
    animation: slideUp 0.3s ease;
}

.cookielist-modal-header {
    padding: 25px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookielist-modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: var(--cl-text);
}

.cookielist-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--cl-text);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookielist-modal-body {
    padding: 25px;
}

.cookielist-modal-body p {
    margin: 0 0 20px 0;
    color: var(--cl-text);
    opacity: 0.8;
}

/* Cookie Categories */
.cookielist-category {
    padding: 20px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    margin-bottom: 15px;
}

.cookielist-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.cookielist-category-info {
    flex: 1;
}

.cookielist-category-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--cl-text);
}

.cookielist-category-info p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--cl-text);
    opacity: 0.7;
}

/* Toggle Switch */
.cookielist-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.cookielist-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookielist-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 24px;
}

.cookielist-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.cookielist-toggle input:checked + .cookielist-toggle-slider {
    background-color: var(--cl-primary);
}

.cookielist-toggle input:checked + .cookielist-toggle-slider:before {
    transform: translateX(24px);
}

.cookielist-toggle.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookielist-toggle.disabled .cookielist-toggle-slider {
    cursor: not-allowed;
}

/* Modal Footer */
.cookielist-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.cookielist-btn-secondary {
    background: transparent;
    color: var(--cl-text);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.cookielist-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.05);
}

.cookielist-btn-primary {
    background: var(--cl-primary);
    color: white;
}

/* Theme: Dark */
.cookielist-banner.cookielist-dark {
    background: #1f2937;
    color: #ffffff;
}

.cookielist-banner.cookielist-dark .cookielist-banner-text h3,
.cookielist-banner.cookielist-dark .cookielist-banner-text p {
    color: #ffffff;
}

.cookielist-banner.cookielist-dark .cookielist-btn-settings {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.cookielist-banner.cookielist-dark .cookielist-btn-settings:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Theme: Minimal */
.cookielist-banner.cookielist-minimal {
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

.cookielist-banner.cookielist-minimal .cookielist-btn {
    border-radius: 2px;
}

.cookielist-banner.cookielist-minimal .cookielist-btn-accept {
    background: #000000;
}

.cookielist-banner.cookielist-minimal .cookielist-btn-settings {
    background: transparent;
    border: 1px solid #000000;
    color: #000000;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

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

/* Button Styles */
.cookielist-btn.btn-rounded {
    border-radius: 8px;
}

.cookielist-btn.btn-square {
    border-radius: 0;
}

.cookielist-btn.btn-pill {
    border-radius: 50px;
}

/* Button Sizes */
.cookielist-btn.btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

.cookielist-btn.btn-medium {
    padding: 10px 20px;
    font-size: 14px;
}

.cookielist-btn.btn-large {
    padding: 12px 24px;
    font-size: 16px;
}

/* Button Icons */
.cookielist-btn .btn-icon {
    display: inline-block;
    margin-right: 6px;
    font-size: 1.1em;
}

/* Layout specific adjustments */
.cookielist-banner.cookielist-bar.cookielist-top {
    position: fixed;
    top: 0;
    bottom: auto;
}

.cookielist-banner.cookielist-box.cookielist-bottom-left {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: auto;
}

.cookielist-banner.cookielist-box.cookielist-bottom-right {
    position: fixed;
    bottom: 20px;
    right: 20px;
    left: auto;
}

.cookielist-banner.cookielist-popup.cookielist-center {
    position: fixed;
    top: 50%;
    left: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
}

/* Responsive */
@media (max-width: 768px) {
    .cookielist-banner.cookielist-bar .cookielist-banner-inner {
        flex-direction: column;
        gap: 15px;
    }
    
    .cookielist-banner-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookielist-banner-actions {
        width: 100%;
        justify-content: center;
    }
    
    .cookielist-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}