/* ===================================
   ServiziWP Cookie Consent Banner
   Modern & Minimal Design
   =================================== */

/* Banner Container */
#swp-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 999999;
    padding: 20px;
    animation: slideIn 0.4s ease-out;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

/* Position variants */
.swp-cookie-bottom {
    bottom: 0;
}

.swp-cookie-top {
    top: 0;
}

.swp-cookie-bottom {
    animation-name: slideInBottom;
}

.swp-cookie-top {
    animation-name: slideInTop;
}

/* Inner Container */
.swp-cookie-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 28px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(10px);
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

/* Theme - Light */
.swp-cookie-theme-light .swp-cookie-container {
    background: rgba(255, 255, 255, 0.98);
    color: #1f2937;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Theme - Dark */
.swp-cookie-theme-dark .swp-cookie-container {
    background: rgba(31, 41, 55, 0.98);
    color: #f9fafb;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Content Area */
.swp-cookie-content {
    flex: 1;
}

.swp-cookie-title {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.swp-cookie-description {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.85;
}

.swp-cookie-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.swp-cookie-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Cookie Categories */
.swp-cookie-categories {
    margin-top: 20px;
    display: grid;
    gap: 12px;
}

.swp-cookie-category {
    padding: 16px;
    border-radius: 8px;
    transition: background 0.2s;
}

.swp-cookie-theme-light .swp-cookie-category {
    background: rgba(0, 0, 0, 0.02);
}

.swp-cookie-theme-dark .swp-cookie-category {
    background: rgba(255, 255, 255, 0.05);
}

.swp-cookie-category:hover {
    background: rgba(59, 130, 246, 0.08);
}

/* Toggle Switch */
.swp-cookie-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.swp-cookie-toggle input[type="checkbox"] {
    display: none;
}

.swp-toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 24px;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.swp-cookie-theme-dark .swp-toggle-slider {
    background: #4b5563;
}

.swp-toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.swp-cookie-toggle input:checked + .swp-toggle-slider {
    background: #3b82f6;
}

.swp-cookie-toggle input:checked + .swp-toggle-slider::after {
    transform: translateX(20px);
}

.swp-cookie-toggle input:disabled + .swp-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.swp-toggle-label {
    flex: 1;
}

.swp-toggle-label strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.swp-toggle-label small {
    display: block;
    font-size: 12px;
    opacity: 0.7;
    line-height: 1.4;
}

/* Actions Area */
.swp-cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.swp-cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.swp-cookie-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.swp-cookie-btn:active {
    transform: translateY(0);
}

.swp-cookie-btn-primary {
    background: #3b82f6;
    color: white;
}

.swp-cookie-btn-primary:hover {
    background: #2563eb;
}

.swp-cookie-btn-secondary {
    background: transparent;
    color: #3b82f6;
    border: 1px solid #3b82f6;
}

.swp-cookie-theme-dark .swp-cookie-btn-secondary {
    color: #60a5fa;
    border-color: #60a5fa;
}

.swp-cookie-btn-secondary:hover {
    background: rgba(59, 130, 246, 0.1);
}

.swp-cookie-btn-outline {
    background: transparent;
    border: 1px solid #cbd5e1;
}

.swp-cookie-theme-light .swp-cookie-btn-outline {
    color: #6b7280;
}

.swp-cookie-theme-dark .swp-cookie-btn-outline {
    color: #9ca3af;
    border-color: #4b5563;
}

.swp-cookie-btn-outline:hover {
    background: rgba(0, 0, 0, 0.05);
}

.swp-cookie-theme-dark .swp-cookie-btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Settings Icon (Floating) */
.swp-cookie-icon {
    position: fixed;
    bottom: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #3b82f6;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 999998;
    animation: fadeInIcon 0.4s ease;
}

/* Icon Position - Right */
.swp-cookie-icon-right {
    right: 20px;
}

/* Icon Position - Left */
.swp-cookie-icon-left {
    left: 20px;
}

.swp-cookie-icon:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.swp-cookie-icon svg {
    animation: rotate 8s linear infinite;
}

.swp-cookie-icon:hover svg {
    animation: rotate 2s linear infinite;
}

/* Animations */
@keyframes slideInBottom {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

@keyframes fadeInIcon {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    #swp-cookie-banner {
        padding: 12px;
    }

    .swp-cookie-container {
        flex-direction: column;
        padding: 20px;
        gap: 16px;
    }

    .swp-cookie-title {
        font-size: 18px;
    }

    .swp-cookie-description {
        font-size: 13px;
    }

    .swp-cookie-actions {
        width: 100%;
        flex-direction: column;
    }

    .swp-cookie-btn {
        width: 100%;
        text-align: center;
    }

    .swp-cookie-icon {
        width: 48px;
        height: 48px;
        bottom: 16px;
    }

    .swp-cookie-icon-right {
        right: 16px;
    }

    .swp-cookie-icon-left {
        left: 16px;
    }
}

@media (max-width: 480px) {
    .swp-cookie-container {
        padding: 16px;
    }

    .swp-cookie-title {
        font-size: 16px;
    }

    .swp-cookie-btn {
        padding: 12px 16px;
        font-size: 13px;
    }
}
