/* Cookie Consent Plugin Styles */

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    background: var(--cookie-bg-color, #ffffff);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 24px;
    max-width: 400px;
    width: calc(100vw - 40px);
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    animation: slideIn 0.3s ease-out;
    color: var(--cookie-text-color, #333333);
    display: none;
}

/* Position variants */
.cookie-consent-banner.bottom-right {
    bottom: 20px;
    right: 20px;
}

.cookie-consent-banner.bottom-left {
    bottom: 20px;
    left: 20px;
}

.cookie-consent-banner.top-right {
    top: 20px;
    right: 20px;
}

.cookie-consent-banner.top-left {
    top: 20px;
    left: 20px;
}

.cookie-consent-banner.bottom-center {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-consent-banner.top-right,
.cookie-consent-banner.top-left {
    animation: slideInFromTop 0.3s ease-out;
}

@keyframes slideInFromTop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-consent-banner.bottom-right {
    animation: slideInFromRight 0.3s ease-out;
}

.cookie-consent-banner.bottom-left {
    animation: slideInFromLeft 0.3s ease-out;
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.cookie-consent-banner.bottom-center {
    animation: slideInFromBottom 0.3s ease-out;
}

@keyframes slideInFromBottom {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.cookie-consent-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.cookie-icon {
    font-size: 24px;
    margin-right: 12px;
}

.cookie-consent-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--cookie-text-color, #333333);
    margin: 0;
}

.cookie-consent-text {
    color: var(--cookie-text-color, #555555);
    line-height: 1.5;
    margin-bottom: 20px;
    font-size: 14px;
    margin-top: 0;
}

.cookie-consent-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 120px;
    box-sizing: border-box;
}

.cookie-btn-primary {
    background: var(--cookie-primary-color, #4f46e5);
    color: white;
}

.cookie-btn-primary:hover {
    background: var(--cookie-primary-hover, #4338ca);
    transform: translateY(-1px);
}

.cookie-btn-secondary {
    background: var(--cookie-secondary-color, #6b7280);
    color: white;
}

.cookie-btn-secondary:hover {
    background: var(--cookie-secondary-hover, #4b5563);
    transform: translateY(-1px);
}

.cookie-preferences-link {
    color: var(--cookie-primary-color, #4f46e5);
    text-decoration: none;
    font-size: 14px;
    display: block;
    text-align: center;
    margin-top: 8px;
    transition: all 0.2s ease;
}

.cookie-preferences-link:hover {
    text-decoration: underline;
    color: var(--cookie-primary-hover, #4338ca);
}

/* Cookie Management Modal */
.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.cookie-modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cookie-modal {
    background: var(--cookie-bg-color, #ffffff);
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
    color: var(--cookie-text-color, #333333);
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.cookie-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--cookie-text-color, #333333);
    margin-bottom: 16px;
    margin-top: 0;
}

.cookie-modal-description {
    color: var(--cookie-text-color, #555555);
    line-height: 1.5;
    margin-bottom: 20px;
    font-size: 14px;
}

.cookie-domains {
    margin-bottom: 20px;
}

.cookie-domains h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--cookie-text-color, #333333);
    margin-bottom: 8px;
    margin-top: 0;
}

.cookie-domains ul {
    list-style: disc;
    margin-left: 20px;
    color: var(--cookie-text-color, #555555);
    font-size: 14px;
    margin-top: 0;
    margin-bottom: 0;
}

.cookie-domains li {
    margin-bottom: 4px;
}

.cookie-categories {
    margin-bottom: 24px;
}

.cookie-category {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.cookie-category:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cookie-category-header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.cookie-category-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--cookie-text-color, #333333);
    margin: 0;
}

.cookie-toggle {
    position: relative;
    width: 48px;
    height: 24px;
    background: #d1d5db;
    border-radius: 12px;
    transition: background 0.2s ease;
    cursor: pointer;
}

.cookie-toggle.active {
    background: var(--cookie-primary-color, #4f46e5);
}

.cookie-toggle.disabled {
    background: var(--cookie-primary-color, #4f46e5);
    opacity: 0.7;
    cursor: not-allowed;
}

.cookie-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cookie-toggle.active::after {
    transform: translateX(24px);
}

.cookie-category-description {
    padding: 0 16px 16px;
    color: var(--cookie-text-color, #555555);
    font-size: 14px;
    line-height: 1.4;
    border-top: 1px solid #f3f4f6;
    margin-top: 0;
}

.cookie-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.cookie-btn-back {
    background: transparent;
    color: var(--cookie-primary-color, #4f46e5);
    border: none;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.cookie-btn-back:hover {
    text-decoration: underline;
    background: rgba(79, 70, 229, 0.1);
}

.cookie-modal-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-consent-banner {
        max-width: none;
        width: calc(100vw - 20px);
        margin: 0 10px;
    }
    
    .cookie-consent-banner.bottom-right,
    .cookie-consent-banner.bottom-left {
        bottom: 10px;
        left: 10px;
        right: 10px;
    }
    
    .cookie-consent-banner.top-right,
    .cookie-consent-banner.top-left {
        top: 10px;
        left: 10px;
        right: 10px;
    }
    
    .cookie-consent-banner.bottom-center {
        bottom: 10px;
        left: 10px;
        right: 10px;
        transform: none;
    }
    
    .cookie-consent-buttons {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
        min-width: auto;
    }
    
    .cookie-modal {
        margin: 10px;
        padding: 20px;
        max-height: calc(100vh - 20px);
    }
    
    .cookie-modal-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cookie-modal-actions {
        order: -1;
        justify-content: stretch;
    }
    
    .cookie-modal-actions .cookie-btn {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .cookie-consent-banner {
        padding: 20px;
        font-size: 14px;
    }
    
    .cookie-consent-title {
        font-size: 16px;
    }
    
    .cookie-consent-text {
        font-size: 13px;
    }
    
    .cookie-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .cookie-modal {
        padding: 16px;
    }
    
    .cookie-modal-title {
        font-size: 18px;
    }
}

/* Hide banner when user has made a choice */
body.cookie-consent-decided .cookie-consent-banner {
    display: none !important;
}

/* Loading state */
.cookie-consent-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Custom scrollbar for modal */
.cookie-modal::-webkit-scrollbar {
    width: 6px;
}

.cookie-modal::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.cookie-modal::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.cookie-modal::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}