/* ── AN Cookie Consent — Axeptio-inspired style ─────────────── */

/* Backdrop */
.ancc-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

#ancc-container.ancc-visible .ancc-backdrop {
    opacity: 1;
    pointer-events: auto;
}

/* Panel */
.ancc-panel {
    position: fixed;
    z-index: 99999;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
    padding: 28px 28px 20px;
    width: 400px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: #333;
    transform: translateY(30px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
    pointer-events: none;
}

/* Position variants */
.ancc-bottom-left .ancc-panel {
    bottom: 20px;
    left: 20px;
}

.ancc-bottom-right .ancc-panel {
    bottom: 20px;
    right: 20px;
}

#ancc-container.ancc-visible .ancc-panel {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* Header */
.ancc-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.ancc-cookie-icon svg {
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
}

.ancc-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
}

/* Description */
.ancc-description {
    color: #555;
    line-height: 1.55;
    margin-bottom: 20px;
}

.ancc-link {
    color: #4B74CC;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ancc-link:hover {
    color: #3458a8;
}

/* Services list */
.ancc-services {
    border-top: 1px solid #eee;
    padding-top: 12px;
    margin-bottom: 20px;
}

.ancc-service-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f2f2f2;
}

.ancc-service-row:last-child {
    border-bottom: none;
}

.ancc-service-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.ancc-service-name {
    font-weight: 600;
    color: #1a1a1a;
}

.ancc-service-desc {
    font-size: 12px;
    color: #888;
}

/* Toggle switch */
.ancc-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
    margin-left: 12px;
    cursor: pointer;
}

.ancc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.ancc-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 26px;
    transition: background 0.25s ease;
}

.ancc-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.25s ease;
}

.ancc-toggle input:checked + .ancc-slider {
    background: #4CAF50;
}

.ancc-toggle input:checked + .ancc-slider::before {
    transform: translateX(22px);
}

/* Buttons */
.ancc-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ancc-btn {
    flex: 1;
    min-width: 0;
    padding: 11px 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s ease, transform 0.15s ease;
    text-align: center;
    line-height: 1.3;
}

.ancc-btn:active {
    transform: scale(0.97);
}

.ancc-btn-refuse {
    background: #f0f0f0;
    color: #555;
}

.ancc-btn-refuse:hover {
    background: #e0e0e0;
}

.ancc-btn-save {
    background: #f0f0f0;
    color: #333;
}

.ancc-btn-save:hover {
    background: #e0e0e0;
}

.ancc-btn-accept {
    background: #F5A623;
    color: #fff;
}

.ancc-btn-accept:hover {
    background: #e6951a;
}

/* Reopener button (small cookie icon) */
.ancc-reopener {
    position: fixed;
    z-index: 99997;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.ancc-reopener.ancc-bottom-left {
    bottom: 20px;
    left: 20px;
}

.ancc-reopener.ancc-bottom-right {
    bottom: 20px;
    right: 20px;
}

.ancc-reopener.ancc-visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.ancc-reopener:hover {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
    transform: scale(1.08);
}

/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 480px) {
    .ancc-panel {
        width: auto;
        left: 10px !important;
        right: 10px !important;
        bottom: 10px !important;
        padding: 20px 18px 16px;
    }

    .ancc-title {
        font-size: 18px;
    }

    .ancc-buttons {
        flex-direction: column;
    }

    .ancc-btn {
        flex: none;
        width: 100%;
    }
}
