/* Wiotly_CookieConsent – plain CSS (no Tailwind) so it works in Hyvä and in the Luma checkout.
   Sizes are in px, not rem: Luma sets the root font size to 62.5%. */
.wcc {
    --wcc-primary: #1e3a5f;
    --wcc-on-primary: #ffffff;
    --wcc-text: #1f2937;
    --wcc-muted: #4b5563;
    --wcc-border: #d1d5db;
    --wcc-bg: #ffffff;
    --wcc-soft: #f3f6fa;
    --wcc-focus: #fb6407;
    font-family: inherit;
    color: var(--wcc-text);
    font-size: 15px;
    line-height: 1.5;
}

.wcc [hidden],
.wcc[hidden] {
    display: none !important;
}

.wcc .wcc-title {
    margin: 0 0 8px;
    padding: 0;
    font-size: 18.4px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--wcc-primary);
}

.wcc p {
    margin: 0 0 12px;
}

.wcc .wcc-link {
    color: var(--wcc-primary);
    text-decoration: underline;
    font-weight: 600;
}

/* Banner (non-blocking, bottom of the screen) */
.wcc-banner {
    position: fixed;
    z-index: 2147483000;
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: 1100px;
    margin: 0 auto;
    background: var(--wcc-bg);
    border: 1px solid var(--wcc-border);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(15, 23, 42, .25);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}

.wcc-banner__inner {
    display: flex;
    gap: 24px;
    align-items: flex-end;
    padding: 20px 24px;
}

.wcc-banner__text {
    flex: 1 1 auto;
}

.wcc-banner__text p {
    margin: 0;
    color: var(--wcc-muted);
}

.wcc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 0 0 auto;
}

/* Buttons: "Accept all" and "Reject all" deliberately share one style */
.wcc .wcc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8.8px 20px;
    border: 2px solid var(--wcc-primary);
    border-radius: 8px;
    background: var(--wcc-primary);
    color: var(--wcc-on-primary);
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.wcc .wcc-btn:hover {
    filter: brightness(1.15);
}

.wcc .wcc-btn--secondary {
    background: var(--wcc-bg);
    color: var(--wcc-primary);
}

.wcc .wcc-btn--secondary:hover {
    background: var(--wcc-soft);
    filter: none;
}

.wcc button:focus-visible,
.wcc a:focus-visible,
.wcc summary:focus-visible,
.wcc input:focus-visible + .wcc-switch__track,
.wcc-modal__dialog:focus-visible,
.wcc-footer-link button:focus-visible {
    outline: 3px solid var(--wcc-focus);
    outline-offset: 2px;
}

/* Settings dialog */
.wcc-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.wcc-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .55);
}

.wcc-modal__dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 680px;
    max-height: calc(100vh - 32px);
    background: var(--wcc-bg);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .35);
    outline: none;
}

.wcc-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px 8px;
}

.wcc-modal__header .wcc-title {
    margin: 0;
}

.wcc .wcc-close {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--wcc-muted);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.wcc .wcc-close:hover {
    background: var(--wcc-soft);
}

.wcc-modal__body {
    padding: 8px 24px 16px;
    overflow-y: auto;
}

.wcc-modal__body > p {
    color: var(--wcc-muted);
}

.wcc-modal__footer {
    justify-content: flex-end;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--wcc-border);
}

.wcc-cat {
    padding: 16px 0;
    border-top: 1px solid var(--wcc-border);
}

.wcc-cat__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.wcc .wcc-cat__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--wcc-text);
}

.wcc .wcc-cat__desc {
    margin: 5.6px 0 8px;
    color: var(--wcc-muted);
    font-size: 14.8px;
}

.wcc-always {
    font-size: 14px;
    font-weight: 600;
    color: #047857;
    white-space: nowrap;
}

/* Toggle switch */
.wcc-switch {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    width: 52px;
    height: 30px;
    cursor: pointer;
}

.wcc-switch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.wcc-switch__track {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: #9ca3af;
    transition: background-color .15s;
    pointer-events: none;
}

.wcc-switch__track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
    transition: transform .15s;
}

.wcc-switch input:checked + .wcc-switch__track {
    background: var(--wcc-primary);
}

.wcc-switch input:checked + .wcc-switch__track::after {
    transform: translateX(22px);
}

.wcc-details summary {
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--wcc-primary);
}

/* Cookie tables (dialog and cookie policy page) */
.wcc-table-wrap {
    margin: 8px 0 16px;
    overflow-x: auto;
}

.wcc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.6px;
}

.wcc-table th,
.wcc-table td {
    padding: 6.4px 8px;
    border-bottom: 1px solid var(--wcc-border);
    text-align: left;
    vertical-align: top;
}

.wcc-table th {
    background: var(--wcc-soft);
    font-weight: 600;
}

.wcc-table code {
    font-size: 12.8px;
    word-break: break-all;
}

.wcc-declaration .wcc-declaration__title {
    margin: 24px 0 8px;
    font-size: 18.4px;
    font-weight: 700;
}

.wcc-declaration .wcc-btn {
    display: inline-flex;
    min-height: 44px;
    padding: 8.8px 20px;
    border: 2px solid #1e3a5f;
    border-radius: 8px;
    background: #1e3a5f;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
}

/* Footer link */
.wcc-footer-link {
    padding: 8px 16px 16px;
    text-align: center;
}

.wcc-footer-link button {
    padding: 4px 8px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
}

html.wcc-modal-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    .wcc-banner {
        left: 8px;
        right: 8px;
        bottom: 8px;
    }

    .wcc-banner__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 16px;
    }

    .wcc-actions {
        flex-direction: column;
    }

    .wcc-actions .wcc-btn {
        width: 100%;
    }

    .wcc-modal {
        padding: 0;
        align-items: flex-end;
    }

    .wcc-modal__dialog {
        max-height: 92vh;
        border-radius: 12px 12px 0 0;
    }

    .wcc-modal__header,
    .wcc-modal__body,
    .wcc-modal__footer {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wcc-switch__track,
    .wcc-switch__track::after {
        transition: none;
    }
}

/* Cookie policy CMS page created by the module */
.wcc-policy {
    max-width: 960px;
    line-height: 1.6;
}

.wcc-policy h2 {
    margin: 32px 0 12px;
    font-size: 22.4px;
    font-weight: 700;
    line-height: 1.3;
}

.wcc-policy p {
    margin: 0 0 16px;
}

.wcc-policy a {
    text-decoration: underline;
}
