/**
 * Copyright (c) 2026 DNA Genics, S.L. All rights reserved.
 * G25 Author Content Policy: acceptance window (drawer on desktop, bottom sheet on mobile),
 * standalone acceptance page and policy body typography.
 */

.g25acp-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(31, 42, 36, 0.6);
    z-index: 1060;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.g25acp-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.g25acp-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 50vw;
    max-width: 760px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--hd-surface, #ffffff);
    color: var(--hd-ink, #1f2a24);
    border-radius: 16px 0 0 16px;
    box-shadow: -8px 0 32px rgba(31, 42, 36, 0.18);
    z-index: 1061;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.g25acp-drawer.open {
    transform: translateX(0);
}

.g25acp-handle {
    display: none;
}

.g25acp-header {
    padding: 24px 28px 12px;
    border-bottom: 1px solid var(--hd-line, #e7e0d3);
}

.g25acp-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--hd-forest, #213a2f);
}

.g25acp-intro {
    margin: 0;
    font-size: 0.95rem;
    color: var(--hd-text-muted, #6c6961);
}

.g25acp-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px 28px;
    background: var(--hd-bg, #faf8f4);
}

.g25acp-scroll:focus-visible {
    outline: 2px solid var(--hd-forest, #213a2f);
    outline-offset: -2px;
}

.g25acp-end {
    height: 1px;
}

.g25acp-footer {
    padding: 16px 28px 20px;
    border-top: 1px solid var(--hd-line, #e7e0d3);
    background: var(--hd-surface, #ffffff);
}

.g25acp-hint {
    margin: 0 0 10px;
    font-size: 0.85rem;
    color: var(--hd-text-muted, #6c6961);
}

.g25acp-hint.is-complete {
    color: var(--hd-sage-strong, #5f7a68);
}

.g25acp-check {
    margin-bottom: 14px;
}

.g25acp-check .custom-control-label {
    font-size: 0.92rem;
    line-height: 1.45;
}

.g25acp-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.g25acp-buttons {
    display: flex;
    gap: 8px;
}

.g25acp-link {
    font-size: 0.88rem;
    color: var(--hd-forest, #213a2f);
    text-decoration: underline;
}

.g25acp-note {
    margin: 10px 0 0;
    font-size: 0.8rem;
    color: var(--hd-text-muted, #6c6961);
}

/* Policy body, shared by the window, the acceptance page and the public page */
.g25acp-body h3 {
    margin: 20px 0 8px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--hd-forest, #213a2f);
}

.g25acp-body p,
.g25acp-body li {
    font-size: 0.93rem;
    line-height: 1.6;
}

.g25acp-body ul {
    padding-left: 1.2rem;
}

.g25acp-meta {
    font-size: 0.82rem;
    color: var(--hd-text-muted, #6c6961);
}

/* Standalone acceptance page */
.g25acp-page {
    padding-top: 80px;
    padding-bottom: 48px;
}

.g25acp-page .g25acp-scroll {
    max-height: 55vh;
    border: 1px solid var(--hd-line, #e7e0d3);
    border-radius: 12px;
}

.g25acp-page .g25acp-footer {
    border-top: 0;
    padding-left: 0;
    padding-right: 0;
}

[dir="rtl"] .g25acp-drawer {
    right: auto;
    left: 0;
    border-radius: 0 16px 16px 0;
    transform: translateX(-100%);
}

[dir="rtl"] .g25acp-drawer.open {
    transform: translateX(0);
}

[dir="rtl"] .g25acp-body ul {
    padding-left: 0;
    padding-right: 1.2rem;
}

@media (max-width: 768px) {
    .g25acp-backdrop {
        background: rgba(31, 42, 36, 0.3);
    }

    .g25acp-drawer,
    [dir="rtl"] .g25acp-drawer {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        height: 90vh;
        border-radius: 24px 24px 0 0;
        transform: translateY(100%);
    }

    .g25acp-drawer.open,
    [dir="rtl"] .g25acp-drawer.open {
        transform: translateY(0);
    }

    .g25acp-handle {
        display: block;
        width: 44px;
        height: 5px;
        margin: 10px auto 0;
        border-radius: 3px;
        background: var(--hd-line, #e7e0d3);
    }

    .g25acp-header,
    .g25acp-scroll,
    .g25acp-footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .g25acp-footer {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }
}

@media (prefers-reduced-motion: reduce) {
    .g25acp-backdrop,
    .g25acp-drawer {
        transition: none;
    }
}
