/* Cookie Amico - Namespaced CSS Styles */

/* Reset for cookie elements */
.cookie_amico-banner *,
.cookie_amico-modal * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Banner Styles */
.cookie_amico-banner {
    position: fixed;
    z-index: 9999;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    padding: 24px;
    max-width: 450px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cookie_amico-banner.cookie_amico-show {
    opacity: 1;
    transform: translateY(0);
}

/* Position variants */
.cookie_amico-banner.cookie_amico-bottom-right {
    bottom: 20px;
    right: 20px;
}

.cookie_amico-banner.cookie_amico-bottom-left {
    bottom: 20px;
    left: 20px;
}

.cookie_amico-banner.cookie_amico-bottom-center {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
}

.cookie_amico-banner.cookie_amico-bottom-center.cookie_amico-show {
    transform: translateX(-50%) translateY(0);
}

/* Dark theme */
.cookie_amico-banner.cookie_amico-dark {
    background: #1a1a1a;
    color: #fff;
}

/* Content */
.cookie_amico-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cookie_amico-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: #1a1a1a;
}

.cookie_amico-dark .cookie_amico-title {
    color: #fff;
}

.cookie_amico-description {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
}

.cookie_amico-dark .cookie_amico-description {
    color: #ccc;
}

/* Buttons */
.cookie_amico-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie_amico-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.cookie_amico-btn-accept-all {
    background: #10b981;
    color: #fff;
}

.cookie_amico-btn-accept-all:hover {
    background: #059669;
}

.cookie_amico-btn-reject-all {
    background: #ef4444;
    color: #fff;
}

.cookie_amico-btn-reject-all:hover {
    background: #dc2626;
}

.cookie_amico-btn-customize {
    background: #e5e7eb;
    color: #374151;
}

.cookie_amico-btn-customize:hover {
    background: #d1d5db;
}

.cookie_amico-dark .cookie_amico-btn-customize {
    background: #374151;
    color: #e5e7eb;
}

.cookie_amico-dark .cookie_amico-btn-customize:hover {
    background: #4b5563;
}

/* Privacy link */
.cookie_amico-privacy-link {
    font-size: 12px;
    color: #6b7280;
    text-decoration: underline;
}

.cookie_amico-privacy-link:hover {
    color: #4b5563;
}

.cookie_amico-dark .cookie_amico-privacy-link {
    color: #9ca3af;
}

.cookie_amico-dark .cookie_amico-privacy-link:hover {
    color: #d1d5db;
}

/* Modal Styles */
.cookie_amico-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cookie_amico-modal.cookie_amico-show {
    opacity: 1;
    visibility: visible;
}

.cookie_amico-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.cookie_amico-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.cookie_amico-modal.cookie_amico-show .cookie_amico-modal-content {
    transform: scale(1);
}

.cookie_amico-modal.cookie_amico-dark .cookie_amico-modal-content {
    background: #1a1a1a;
    color: #fff;
}

/* Modal header */
.cookie_amico-modal-header {
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie_amico-modal.cookie_amico-dark .cookie_amico-modal-header {
    border-bottom-color: #374151;
}

.cookie_amico-modal-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

.cookie_amico-modal.cookie_amico-dark .cookie_amico-modal-title {
    color: #fff;
}

.cookie_amico-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.cookie_amico-modal-close:hover {
    color: #374151;
}

.cookie_amico-modal.cookie_amico-dark .cookie_amico-modal-close {
    color: #9ca3af;
}

.cookie_amico-modal.cookie_amico-dark .cookie_amico-modal-close:hover {
    color: #e5e7eb;
}

/* Modal body */
.cookie_amico-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* Category styles */
.cookie_amico-category {
    margin-bottom: 24px;
}

.cookie_amico-category:last-child {
    margin-bottom: 0;
}

.cookie_amico-category-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.cookie_amico-category-title {
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
}

.cookie_amico-modal.cookie_amico-dark .cookie_amico-category-title {
    color: #fff;
}

.cookie_amico-category-description {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.cookie_amico-modal.cookie_amico-dark .cookie_amico-category-description {
    color: #9ca3af;
}

/* Toggle switch */
.cookie_amico-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

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

.cookie_amico-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

.cookie_amico-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie_amico-switch input:checked + .cookie_amico-slider {
    background-color: #10b981;
}

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

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

/* Modal footer */
.cookie_amico-modal-footer {
    padding: 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.cookie_amico-modal.cookie_amico-dark .cookie_amico-modal-footer {
    border-top-color: #374151;
}

.cookie_amico-btn-save {
    background: #10b981;
    color: #fff;
}

.cookie_amico-btn-save:hover {
    background: #059669;
}

.cookie_amico-btn-cancel {
    background: #e5e7eb;
    color: #374151;
}

.cookie_amico-btn-cancel:hover {
    background: #d1d5db;
}

.cookie_amico-modal.cookie_amico-dark .cookie_amico-btn-cancel {
    background: #374151;
    color: #e5e7eb;
}

.cookie_amico-modal.cookie_amico-dark .cookie_amico-btn-cancel:hover {
    background: #4b5563;
}

/* Responsive */
@media (max-width: 640px) {
    .cookie_amico-banner {
        max-width: calc(100% - 40px);
        margin: 0 20px 20px;
    }
    
    .cookie_amico-banner.cookie_amico-bottom-right,
    .cookie_amico-banner.cookie_amico-bottom-left,
    .cookie_amico-banner.cookie_amico-bottom-center {
        bottom: 0;
        left: 0;
        right: 0;
        transform: none;
    }
    
    .cookie_amico-banner.cookie_amico-bottom-center.cookie_amico-show {
        transform: none;
    }
    
    .cookie_amico-buttons {
        flex-direction: column;
    }
    
    .cookie_amico-btn {
        width: 100%;
    }
    
    .cookie_amico-modal-content {
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 0;
    }
}