/* Self-hosted GDPR cookie banner — artisan workshop theme */

.fw-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10050;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.fw-cookie-banner--closing {
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
}

.fw-cookie-banner__inner {
    pointer-events: auto;
    max-width: 720px;
    margin: 0 auto;
    padding: 18px 20px;
    background: #FDFBF7;
    border: 1px solid #d6d3d1;
    border-radius: 1rem;
    box-shadow:
        0 8px 32px rgba(92, 74, 58, 0.12),
        0 2px 8px rgba(92, 74, 58, 0.06);
    color: #5C4A3A;
    font-family: 'Inter', system-ui, sans-serif;
}

.fw-cookie-banner__title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
    color: #5C4A3A;
    line-height: 1.35;
}

.fw-cookie-banner__body {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.55;
    color: #8B7355;
}

.fw-cookie-banner__panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-bottom: 0;
    transition: max-height 0.35s ease, opacity 0.3s ease, margin-bottom 0.35s ease;
}

.fw-cookie-banner__panel--open {
    max-height: 520px;
    opacity: 1;
    margin-bottom: 14px;
}

.fw-cookie-banner__category {
    padding: 12px 0;
    border-top: 1px solid #e7e5e4;
}

.fw-cookie-banner__category--essential {
    border-top: none;
    padding-top: 4px;
}

.fw-cookie-banner__cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.fw-cookie-banner__cat-title {
    font-size: 13px;
    font-weight: 600;
    color: #5C4A3A;
}

.fw-cookie-banner__cat-desc {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #8B7355;
}

.fw-cookie-banner__badge {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f5f0e8;
    border: 1px solid #d6d3d1;
    color: #8B7355;
}

.fw-cookie-toggle {
    position: relative;
    display: inline-flex;
    cursor: pointer;
    flex-shrink: 0;
}

.fw-cookie-toggle__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.fw-cookie-toggle__track {
    display: block;
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: #d6d3d1;
    transition: background 0.2s ease;
    position: relative;
}

.fw-cookie-toggle__track--on {
    background: linear-gradient(135deg, #7A9B76 0%, #6B8F67 100%);
}

.fw-cookie-toggle__thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(92, 74, 58, 0.2);
    transition: transform 0.2s ease;
}

.fw-cookie-toggle__track--on .fw-cookie-toggle__thumb {
    transform: translateX(18px);
}

.fw-cookie-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: stretch;
}

.fw-cookie-banner__btn {
    flex: 1 1 120px;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 0.75rem;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    box-shadow: 0 2px 8px rgba(92, 74, 58, 0.08);
}

.fw-cookie-banner__btn:active {
    transform: translateY(1px);
}

.fw-cookie-banner__btn--settings {
    background: transparent;
    border: 1px solid transparent;
    color: #8B7355;
    box-shadow: none;
    text-decoration: underline;
    text-underline-offset: 3px;
    flex: 1 1 100%;
    min-height: 36px;
}

.fw-cookie-banner__btn--settings:hover {
    color: #5C4A3A;
}

.fw-cookie-banner__btn--reject {
    background: #FAF7F0;
    border: 1px solid #d6d3d1;
    color: #5C4A3A;
}

.fw-cookie-banner__btn--reject:hover {
    background: #fff;
    border-color: #a8a29e;
    box-shadow: 0 4px 12px rgba(92, 74, 58, 0.1);
}

.fw-cookie-banner__btn--accept,
.fw-cookie-banner__btn--save {
    background: linear-gradient(135deg, #7A9B76 0%, #6B8F67 100%);
    border: 1px solid #6B8F67;
    color: #fff;
}

.fw-cookie-banner__btn--accept:hover,
.fw-cookie-banner__btn--save:hover {
    box-shadow: 0 4px 14px rgba(107, 143, 103, 0.35);
}

.fw-cookie-banner__btn--save {
    width: 100%;
    margin-top: 8px;
}

@media (min-width: 640px) {
    .fw-cookie-banner__actions {
        justify-content: flex-end;
        align-items: center;
    }

    .fw-cookie-banner__btn--settings {
        flex: 0 1 auto;
        order: -1;
        margin-right: auto;
        min-height: 44px;
    }

    .fw-cookie-banner__btn {
        flex: 0 1 auto;
        min-width: 130px;
    }
}
