/**
 * Hittegodsportalen Cookie Consent - CSS
 * Matcher hittegodsportalen design
 */

/* Popup container */
.hg-cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    z-index: 999999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.hg-cookie-popup--visible {
    opacity: 1;
    visibility: visible;
}

.hg-cookie-popup--hidden {
    opacity: 0;
    visibility: hidden;
}

/* Overlay */
.hg-cookie-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
}

/* Box */
.hg-cookie-popup__box {
    position: relative;
    background: #ffffff;
    border-radius: 16px 16px 0 0;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
    animation: hgCookieSlideUp 0.4s ease;
}

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

/* Header */
.hg-cookie-popup__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 24px 0;
}

.hg-cookie-popup__icon {
    font-size: 32px;
}

.hg-cookie-popup__header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #1e3a5f;
}

/* Content */
.hg-cookie-popup__content {
    padding: 16px 24px;
}

.hg-cookie-popup__content p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #4a5568;
}

/* Categories */
.hg-cookie-popup__categories {
    margin-top: 20px;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}

.hg-cookie-category {
    padding: 16px;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 12px;
}

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

.hg-cookie-category__header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hg-cookie-category__header strong {
    font-size: 15px;
    color: #1e3a5f;
}

.hg-cookie-category__desc {
    margin: 10px 0 0 54px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

/* Toggle switch */
.hg-cookie-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

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

.hg-cookie-toggle__slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cbd5e1;
    border-radius: 24px;
    transition: 0.3s;
}

.hg-cookie-toggle__slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.hg-cookie-toggle input:checked + .hg-cookie-toggle__slider {
    background: #7ecec2;
}

.hg-cookie-toggle input:disabled + .hg-cookie-toggle__slider {
    background: #7ecec2;
    opacity: 0.7;
    cursor: not-allowed;
}

.hg-cookie-toggle input:checked + .hg-cookie-toggle__slider::before {
    transform: translateX(20px);
}

/* Badge */
.hg-cookie-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 8px;
}

.hg-cookie-badge--required {
    background: #e0f2fe;
    color: #0369a1;
}

/* Actions */
.hg-cookie-popup__actions {
    display: flex;
    gap: 10px;
    padding: 20px 24px;
    border-top: 1px solid #e2e8f0;
}

/* Buttons */
.hg-cookie-btn {
    flex: 1;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.hg-cookie-btn--primary {
    background: linear-gradient(135deg, #1e3a5f, #2d5a8a);
    color: white;
}

.hg-cookie-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

.hg-cookie-btn--secondary {
    background: #f1f5f9;
    color: #475569;
}

.hg-cookie-btn--secondary:hover {
    background: #e2e8f0;
}

.hg-cookie-btn--block {
    width: 100%;
}

/* Footer */
.hg-cookie-popup__footer {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 16px 24px 24px;
    font-size: 13px;
}

.hg-cookie-popup__footer a {
    color: #64748b;
    text-decoration: none;
}

.hg-cookie-popup__footer a:hover {
    color: #1e3a5f;
    text-decoration: underline;
}

.hg-cookie-popup__footer span {
    color: #cbd5e1;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .hg-cookie-popup {
        padding: 0;
    }
    
    .hg-cookie-popup__box {
        border-radius: 20px 20px 0 0;
        max-height: 85vh;
    }
    
    .hg-cookie-popup__actions {
        flex-direction: column;
    }
    
    .hg-cookie-btn {
        width: 100%;
    }
    
    .hg-cookie-category__desc {
        margin-left: 0;
        margin-top: 12px;
    }
}

/* Desktop - show as centered modal */
@media (min-width: 768px) {
    .hg-cookie-popup {
        align-items: center;
    }
    
    .hg-cookie-popup__box {
        border-radius: 16px;
        animation: hgCookieFadeIn 0.4s ease;
    }
    
    @keyframes hgCookieFadeIn {
        from {
            transform: scale(0.95);
            opacity: 0;
        }
        to {
            transform: scale(1);
            opacity: 1;
        }
    }
}
