/* WPR Cookie Consent for TYPO3 – Version 0.3.1 */
.wprc-consent,
.wprc-consent *,
.wprc-cookie-overview,
.wprc-cookie-overview * {
    box-sizing: border-box;
}

.wprc-consent {
    --wprc-accent: #1c6bb0;
    --wprc-accent-dark: #165588;
    --wprc-reject: #b43d3d;
    --wprc-border: #d8dee3;
    --wprc-background: #fff;
    --wprc-text: #2f3437;
    position: fixed;
    left: 10px;
    bottom: 10px;
    z-index: 99999;
    transition: bottom 0.45s ease;
    max-width: min(540px, calc(100vw - 20px));
    color: var(--wprc-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.45;
}

.wprc-consent [hidden] {
    display: none !important;
}

.wprc-consent:not(.wprc-consent--open) {
    bottom: -20px;
}

.wprc-consent:not(.wprc-consent--open):hover,
.wprc-consent:not(.wprc-consent--open):focus-within {
    bottom: 10px;
}

.wprc-consent__opener {
    position: relative;
    display: block;
    min-height: 44px;
    padding: 8px 14px 10px;
    border: 1px solid var(--wprc-border);
    border-top: 3px solid var(--wprc-accent);
    border-radius: 8px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.22);
    color: var(--wprc-accent-dark);
    background: var(--wprc-background);
    font: inherit;
    font-weight: bold;
    cursor: pointer;
}

.wprc-consent__opener-label {
    display: block;
    line-height: 20px;
}

.wprc-consent__opener-tooltip {
    position: absolute;
    left: 0;
    bottom: calc(100% + 10px);
    z-index: 2;
    visibility: hidden;
    width: max-content;
    max-width: min(190px, calc(100vw - 20px));
    padding: 9px 11px;
    border: 1px solid var(--wprc-accent-dark);
    border-radius: 6px;
    opacity: 0;
    color: #333;
    background: #ececec;
    box-shadow: 0 4px 13px rgba(0, 0, 0, 0.16);
    font-size: 13px;
    font-weight: normal;
    line-height: 1.25;
    text-align: left;
    white-space: nowrap;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

.wprc-consent__opener-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 25px;
    border-width: 6px;
    border-style: solid;
    border-color: var(--wprc-accent-dark) transparent transparent;
}

.wprc-consent__opener:hover .wprc-consent__opener-tooltip,
.wprc-consent__opener:focus-visible .wprc-consent__opener-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0s;
}

.wprc-consent--open {
    bottom: 10px;
}

.wprc-consent--open .wprc-consent__opener {
    display: none;
}

.wprc-consent__panel {
    max-height: calc(100vh - 20px);
    overflow: auto;
    padding: 18px;
    border: 1px solid var(--wprc-border);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.26);
    background: var(--wprc-background);
}

.wprc-consent__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 10px;
}

.wprc-consent__title {
    margin: 0;
    color: var(--wprc-accent-dark);
    font-size: 20px;
    line-height: 1.25;
}

.wprc-consent__close {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    color: #555;
    background: transparent;
    font: inherit;
    font-size: 28px;
    line-height: 30px;
    cursor: pointer;
}

.wprc-consent__close:hover,
.wprc-consent__close:focus-visible {
    color: var(--wprc-reject);
}

.wprc-consent__intro {
    margin: 0 0 14px;
}

.wprc-consent__details {
    margin: 12px 0;
}

.wprc-consent__cookie-list-title {
    margin: 16px 0 8px;
    color: var(--wprc-accent-dark);
    font-size: 16px;
}

.wprc-consent__cookie-list .wprc-cookie-overview__item {
    margin-bottom: 8px;
    background: #fff;
}

.wprc-consent__cookie-list .wprc-cookie-overview__line {
    overflow-wrap: anywhere;
}

.wprc-consent__category {
    margin-top: 8px;
    padding: 10px;
    border: 1px solid var(--wprc-border);
    border-radius: 6px;
    background: #f7f9fa;
}

.wprc-consent__category-label {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    cursor: pointer;
}

.wprc-consent__category-label input {
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
}

.wprc-consent__category-label input:disabled {
    cursor: not-allowed;
}

.wprc-consent__category-text,
.wprc-consent__category-title,
.wprc-consent__category-description {
    display: block;
}

.wprc-consent__category-description {
    margin-top: 3px;
    font-size: 13px;
}

.wprc-consent__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 14px 0;
}

.wprc-consent__button,
.wprc-cookie-overview__button {
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 5px;
    font: inherit;
    font-weight: bold;
    line-height: 1.25;
    cursor: pointer;
}

.wprc-consent__button--accept,
.wprc-consent__button--save,
.wprc-cookie-overview__button {
    border-color: var(--wprc-accent, #1c6bb0);
    color: #fff;
    background: var(--wprc-accent, #1c6bb0);
}

.wprc-consent__button--reject {
    border-color: var(--wprc-reject);
    color: #fff;
    background: var(--wprc-reject);
}

.wprc-consent__button--secondary {
    border-color: #b8c0c6;
    color: #333;
    background: #e3e6e8;
}

.wprc-consent__button:hover,
.wprc-consent__button:focus-visible,
.wprc-cookie-overview__button:hover,
.wprc-cookie-overview__button:focus-visible {
    filter: brightness(0.94);
}

.wprc-consent button:focus-visible,
.wprc-consent a:focus-visible,
.wprc-cookie-overview button:focus-visible {
    outline: 3px solid rgba(28, 107, 176, 0.35);
    outline-offset: 2px;
}

.wprc-consent__footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
    padding-top: 4px;
    text-align: center;
}

.wprc-consent__footer-link,
.wprc-consent__footer-link:visited {
    color: var(--wprc-accent-dark);
    font-size: 12px;
    text-decoration: underline;
}

.wprc-consent__footer-link:hover,
.wprc-consent__footer-link:focus-visible {
    text-decoration: none;
}

.wprc-cookie-overview {
    margin: 1.5em 0;
}

.wprc-cookie-overview__title,
.wprc-cookie-overview__group-title {
    color: #165588;
}

.wprc-cookie-overview__item {
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid #d8dee3;
    border-radius: 5px;
    background: #f7f9fa;
}

.wprc-cookie-overview__line,
.wprc-cookie-overview__status p {
    margin: 4px 0;
}

.wprc-cookie-overview__status {
    margin: 12px 0;
    padding: 10px 12px;
    border-left: 4px solid #1c6bb0;
    background: #eef5fb;
}

.wprc-cookie-overview__button {
    width: auto;
    min-width: 220px;
}

@media (max-width: 600px) {
    .wprc-consent {
        right: 10px;
        max-width: none;
    }

    .wprc-consent:not(.wprc-consent--open) {
        right: auto;
        max-width: calc(100vw - 20px);
    }

    .wprc-consent__panel {
        padding: 15px;
    }

    .wprc-consent__actions {
        grid-template-columns: 1fr;
    }

    .wprc-consent__button,
    .wprc-cookie-overview__button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wprc-consent *,
    .wprc-cookie-overview * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

@media print {
    .wprc-consent {
        display: none !important;
    }
}
