/* ===== RA Gartenbau – Cookie Consent ===== */

.rag-cc,
.rag-cc *,
.rag-cc-modal,
.rag-cc-modal *,
.rag-cc-revoke {
    box-sizing: border-box;
    font-family: var(--font-sans);
}

/* ----- Bottom Banner ----- */
.rag-cc {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem);
    z-index: 9999;
    max-width: 540px;
    margin-left: 0;
    margin-right: auto;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-2xl);
    box-shadow: 0 20px 50px rgba(11, 15, 20, 0.15);
    padding: 1.25rem 1.25rem 1rem;
    color: var(--color-foreground);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.rag-cc.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
@media (min-width: 768px) {
    .rag-cc {
        left: 1.25rem;
        right: auto;
        bottom: 1.25rem;
        max-width: 420px;
        margin: 0;
    }
}

.rag-cc__title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}
.rag-cc__text {
    font-size: 0.875rem;
    line-height: 1.55;
    color: rgba(11, 15, 20, 0.75);
    margin-bottom: 1rem;
}
.rag-cc__text a {
    color: var(--color-primary);
    text-decoration: underline;
}
.rag-cc__text a:hover {
    color: var(--color-primary-hover);
}

.rag-cc__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}
.rag-cc__actions-row {
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
}

/* ----- Buttons ----- */
.rag-cc__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.2;
    border-radius: var(--radius-2xl);
    padding: 0.625rem 1rem;
    border: 1px solid transparent;
    transition: all 0.2s;
    font-family: inherit;
    cursor: pointer;
    background: none;
    color: inherit;
    text-decoration: none;
}
.rag-cc__btn--primary {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}
.rag-cc__btn--primary:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}
.rag-cc__btn--outline {
    background: var(--color-white);
    color: var(--color-foreground);
    border-color: var(--color-border);
}
.rag-cc__btn--outline:hover {
    border-color: rgba(31, 94, 59, 0.45);
    color: var(--color-primary);
}
.rag-cc__btn--link {
    background: transparent;
    color: var(--color-primary);
    padding: 0.375rem 0.5rem;
    text-decoration: underline;
    font-weight: 500;
    width: auto;
}
.rag-cc__btn--link:hover {
    color: var(--color-primary-hover);
}

/* ----- Modal ----- */
.rag-cc-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.rag-cc-modal.is-open {
    display: flex;
}
.rag-cc-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(11, 15, 20, 0.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.rag-cc-modal__dialog {
    position: relative;
    background: var(--color-white);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--color-border);
    box-shadow: 0 30px 60px rgba(11, 15, 20, 0.25);
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.rag-cc-modal__header {
    padding: 1.125rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--color-border);
}
.rag-cc-modal__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.25rem;
    line-height: 1.2;
}
.rag-cc-modal__close {
    background: none;
    border: none;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-full);
    color: rgba(11, 15, 20, 0.6);
    font-size: 1.25rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}
.rag-cc-modal__close:hover {
    background: var(--color-muted);
    color: var(--color-primary);
}
.rag-cc-modal__body {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    flex: 1;
}
.rag-cc-modal__intro {
    font-size: 0.875rem;
    color: rgba(11, 15, 20, 0.75);
    line-height: 1.55;
    margin-bottom: 1rem;
}
.rag-cc-modal__intro a {
    color: var(--color-primary);
    text-decoration: underline;
}
.rag-cc-modal__footer {
    padding: 0.875rem 1.5rem 1rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    background: var(--color-muted);
}
.rag-cc-modal__footer .rag-cc__btn {
    width: auto;
    min-width: 140px;
}
@media (max-width: 520px) {
    .rag-cc-modal__footer {
        flex-direction: column;
    }
    .rag-cc-modal__footer .rag-cc__btn {
        width: 100%;
    }
}

/* ----- Categories ----- */
.rag-cc-category {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: var(--color-white);
}
.rag-cc-category:last-child {
    margin-bottom: 0;
}
.rag-cc-category__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
.rag-cc-category__title {
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}
.rag-cc-category__desc {
    font-size: 0.8125rem;
    color: rgba(11, 15, 20, 0.7);
    line-height: 1.5;
    margin: 0.25rem 0 0;
}
.rag-cc-category__badge {
    font-size: 0.75rem;
    color: var(--color-primary);
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    background: rgba(31, 94, 59, 0.1);
    border-radius: var(--radius-full);
    white-space: nowrap;
}

/* ----- Toggle Switch ----- */
.rag-cc-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}
.rag-cc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}
.rag-cc-switch__slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cfcfc8;
    border-radius: var(--radius-full);
    transition: background 0.2s;
}
.rag-cc-switch__slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background: var(--color-white);
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.rag-cc-switch input:checked + .rag-cc-switch__slider {
    background: var(--color-primary);
}
.rag-cc-switch input:checked + .rag-cc-switch__slider::before {
    transform: translateX(18px);
}
.rag-cc-switch input:disabled + .rag-cc-switch__slider {
    opacity: 0.55;
    cursor: not-allowed;
}
.rag-cc-switch input:focus-visible + .rag-cc-switch__slider {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ----- Revoke / Re-open button ----- */
.rag-cc-revoke {
    position: fixed;
    left: 0.75rem;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 0.75rem);
    z-index: 40;
    background: var(--color-white);
    color: var(--color-foreground);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    padding: 0.5rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 500;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    display: none;
    align-items: center;
    gap: 0.375rem;
    font-family: var(--font-sans);
    transition: all 0.15s;
}
.rag-cc-revoke.is-visible {
    display: inline-flex;
}
.rag-cc-revoke:hover {
    color: var(--color-primary);
    border-color: rgba(31, 94, 59, 0.4);
}
