/**
 * Setmee Cookie Consent Banner Styles
 * Adapted from setmee.com implementation for WordPress
 */

/* Reset and base styles */
#setmee-cookie-consent-wrapper * {
    box-sizing: border-box;
}

/* Backdrop */
.setmee-cookie-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.2);
    z-index: 999998;
    pointer-events: none;
    transition: background-color 0.3s ease;
}

.setmee-cookie-backdrop.modal-open {
    background-color: rgba(0, 0, 0, 0.4);
}

/* Main cookie banner */
.setmee-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    border-top: 1px solid #e5e7eb;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
}

@supports (backdrop-filter: blur(8px)) {
    .setmee-cookie-banner {
        background: rgba(255, 255, 255, 0.8);
    }
}

.setmee-cookie-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 24px;
}

.setmee-cookie-content {
    display: grid;
    gap: 16px;
    align-items: center;
}

/* Text content */
.setmee-cookie-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.setmee-cookie-description {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* Actions */
.setmee-cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

/* Buttons */
.setmee-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    line-height: 1.4;
}

.setmee-btn-primary {
    background-color: rgb(30, 64, 175);
    color: white;
}

.setmee-btn-primary:hover {
    background-color: rgb(29, 78, 216);
    transform: translateY(-1px);
}

.setmee-btn-secondary {
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.setmee-btn-secondary:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.setmee-privacy-link {
    font-size: 14px;
    color: #1d4ed8;
    text-decoration: none;
    margin-left: auto;
}

.setmee-privacy-link:hover {
    text-decoration: underline;
}

/* Modal styles */
.setmee-cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.setmee-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.setmee-modal-content {
    position: relative;
    width: 100%;
    max-width: 512px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid #e5e7eb;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.setmee-modal-header {
    padding: 24px 24px 0 24px;
}

.setmee-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 16px 0;
}

.setmee-modal-body {
    padding: 0 24px;
    max-height: 400px;
    overflow-y: auto;
}

.setmee-cookie-category {
    margin-bottom: 20px;
}

.setmee-category-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.setmee-category-checkbox {
    margin-top: 4px;
    width: 16px;
    height: 16px;
    accent-color: rgb(30, 64, 175);
}

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

.setmee-category-name {
    font-weight: 500;
    color: #111827;
    margin-bottom: 4px;
}

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

.setmee-modal-footer {
    padding: 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid #f3f4f6;
}

/* Responsive design */
@media (min-width: 768px) {
    .setmee-cookie-container {
        padding: 24px;
    }
    
    .setmee-cookie-content {
        grid-template-columns: 2fr 1fr;
        gap: 24px;
    }
    
    .setmee-cookie-title {
        font-size: 18px;
    }
    
    .setmee-cookie-actions {
        justify-content: flex-end;
    }
    
    .setmee-privacy-link {
        margin-left: 0;
    }
}

@media (max-width: 767px) {
    .setmee-cookie-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .setmee-btn {
        text-align: center;
        width: 100%;
    }
    
    .setmee-privacy-link {
        text-align: center;
        margin-left: 0;
    }
    
    .setmee-modal-content {
        margin: 16px;
        max-height: calc(100vh - 32px);
        display: flex;
        flex-direction: column;
    }
    
    .setmee-modal-body {
        flex: 1;
        overflow-y: auto;
    }
    
    .setmee-modal-footer {
        flex-direction: column;
    }
    
    .setmee-modal-footer .setmee-btn {
        width: 100%;
    }
}

/* Animation classes */
.setmee-fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus styles for accessibility */
.setmee-btn:focus,
.setmee-category-checkbox:focus,
.setmee-privacy-link:focus {
    outline: 2px solid rgb(30, 64, 175);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .setmee-cookie-banner {
        background: white;
        border-top: 2px solid #000;
    }
    
    .setmee-btn-secondary {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .setmee-btn,
    .setmee-modal-content,
    .setmee-cookie-backdrop {
        transition: none;
        animation: none;
    }
}
