/**
 * Legal / policy page components — refund policy layout, tables, notices.
 */

html.ha-unified .policy-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    padding: 22px 26px;
    margin-bottom: 32px;
    background: linear-gradient(135deg, rgba(0, 115, 5, 0.08) 0%, rgba(0, 121, 198, 0.06) 100%);
    border: 1px solid rgba(0, 115, 5, 0.18);
    border-radius: var(--border-radius, 12px);
    box-shadow: 0 8px 24px rgba(0, 75, 4, 0.06);
    transition:
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.28s ease,
        border-color 0.28s ease;
}

html.ha-unified .policy-meta:hover,
html.ha-unified .policy-meta:focus-within {
    border-color: rgba(0, 115, 5, 0.3);
    box-shadow: 0 14px 32px rgba(0, 75, 4, 0.1);
    transform: translateY(-2px);
}

html.ha-unified .policy-meta.is-ready {
    animation: policy-meta-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes policy-meta-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

html.ha-unified .policy-meta__org {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    color: var(--dark-green, #004b04);
    font-weight: 600;
    margin: 0;
}

html.ha-unified .policy-meta__address {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-light, #525a54);
}

html.ha-unified .policy-meta__contact {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-light, #525a54);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

html.ha-unified .policy-meta__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(0, 115, 5, 0.18);
    color: var(--dark-green, #004b04) !important;
    font-weight: 600;
    font-size: 0.84rem;
    text-decoration: none !important;
    position: relative;
    overflow: hidden;
    transition:
        background 0.22s ease,
        border-color 0.22s ease,
        transform 0.22s ease,
        box-shadow 0.22s ease;
    -webkit-tap-highlight-color: transparent;
}

html.ha-unified .policy-meta__chip i {
    color: var(--primary-green, #007305);
    font-size: 0.78rem;
}

html.ha-unified .policy-meta__chip:hover,
html.ha-unified .policy-meta__chip:focus-visible {
    background: #ecfdf5;
    border-color: rgba(0, 115, 5, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 75, 4, 0.12);
    outline: none;
}

html.ha-unified .policy-meta__download {
    margin: 4px 0 0;
}

html.ha-unified .policy-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 12px 22px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #007a05 0%, #004b04 100%);
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background-clip: border-box !important;
    -webkit-background-clip: border-box !important;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 8px 20px rgba(0, 75, 4, 0.24);
    transition:
        transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.24s ease,
        background 0.24s ease;
    -webkit-tap-highlight-color: transparent;
}

html.ha-unified .policy-download-btn i {
    color: #fecaca !important;
    -webkit-text-fill-color: currentColor !important;
}

html.ha-unified .policy-download-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.22) 45%, transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.5s ease;
    pointer-events: none;
}

html.ha-unified .policy-download-btn:hover,
html.ha-unified .policy-download-btn:focus-visible {
    background: linear-gradient(135deg, #008806 0%, #005805 100%);
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 75, 4, 0.32);
    outline: none;
}

html.ha-unified .policy-download-btn:hover::before,
html.ha-unified .policy-download-btn:focus-visible::before {
    transform: translateX(120%);
}

html.ha-unified .policy-download-btn:active {
    transform: translateY(-1px) scale(0.98);
}

html.ha-unified .policy-download-btn.is-pulse {
    animation: policy-btn-pulse 0.48s ease;
}

html.ha-unified .policy-download-btn.is-downloading i {
    animation: policy-icon-bounce 0.55s ease infinite;
}

@keyframes policy-btn-pulse {
    0% { transform: scale(1); }
    40% { transform: scale(1.04); }
    100% { transform: scale(1); }
}

@keyframes policy-icon-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

html.ha-unified .policy-meta__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

html.ha-unified .policy-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
    transition:
        transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.22s ease,
        background 0.22s ease,
        border-color 0.22s ease;
    -webkit-tap-highlight-color: transparent;
}

html.ha-unified .policy-badge--date {
    background: var(--dark-green, #004b04);
    color: #fff;
    cursor: default;
}

html.ha-unified .policy-badge--date:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 75, 4, 0.22);
}

html.ha-unified .policy-badge--scope {
    background: #fff;
    color: var(--dark-green, #004b04);
    border: 1px solid rgba(0, 115, 5, 0.25);
    cursor: default;
}

html.ha-unified .policy-badge--scope:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 115, 5, 0.4);
    box-shadow: 0 6px 16px rgba(0, 75, 4, 0.1);
}

html.ha-unified .policy-badge--link {
    text-decoration: none !important;
    cursor: pointer;
}

html.ha-unified .policy-badge--link:hover,
html.ha-unified .policy-badge--link:focus-visible {
    background: #ecfdf5;
    color: var(--dark-green, #004b04) !important;
    transform: translateY(-2px) translateX(2px);
    box-shadow: 0 8px 18px rgba(0, 75, 4, 0.14);
    outline: none;
}

html.ha-unified .policy-badge.is-pulse {
    animation: policy-btn-pulse 0.45s ease;
}

html.ha-unified .policy-meta__ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 115, 5, 0.2);
    transform: scale(0);
    animation: policy-meta-ripple 0.5s ease-out forwards;
    pointer-events: none;
}

html.ha-unified .policy-badge--date .policy-meta__ripple {
    background: rgba(255, 255, 255, 0.35);
}

@keyframes policy-meta-ripple {
    to {
        transform: scale(2.6);
        opacity: 0;
    }
}

html.ha-unified .policy-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 36px;
}

html.ha-unified .policy-summary__card {
    padding: 22px 20px;
    border-radius: var(--border-radius, 12px);
    border: 1px solid var(--border-color, #e5ebe7);
    background: var(--bg-light, #f5faf6);
    text-align: center;
}

html.ha-unified .policy-summary__card i {
    font-size: 1.5rem;
    color: var(--primary-green, #007305);
    margin-bottom: 10px;
}

html.ha-unified .policy-summary__card strong {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    color: var(--dark-green, #004b04);
    margin-bottom: 8px;
}

html.ha-unified .policy-summary__card span {
    font-size: 0.92rem;
    color: var(--text-light, #525a54);
    line-height: 1.5;
}

html.ha-unified .policy-summary__card--alert {
    background: #fff8f6;
    border-color: rgba(180, 50, 30, 0.22);
}

html.ha-unified .policy-summary__card--alert i {
    color: #b4321e;
}

html.ha-unified .policy-notice {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 20px 22px;
    margin: 24px 0;
    border-radius: var(--border-radius, 12px);
    border-left: 4px solid var(--primary-green, #007305);
    background: rgba(0, 115, 5, 0.06);
}

html.ha-unified .policy-notice--strict {
    border-left-color: #b4321e;
    background: rgba(180, 50, 30, 0.06);
}

html.ha-unified .policy-notice i {
    font-size: 1.25rem;
    color: var(--primary-green, #007305);
    margin-top: 3px;
    flex-shrink: 0;
}

html.ha-unified .policy-notice--strict i {
    color: #b4321e;
}

html.ha-unified .policy-notice p {
    margin: 0;
    color: var(--text-main, #1a1f1b);
    font-weight: 500;
}

html.ha-unified .policy-section {
    padding: 28px 0;
    border-bottom: 1px solid var(--border-color, #e5ebe7);
}

html.ha-unified .policy-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

html.ha-unified .policy-section h3 {
    margin-top: 0;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

html.ha-unified .policy-section h3 .section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--dark-green, #004b04);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

html.ha-unified .refund-window-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0 24px;
    font-size: 0.95rem;
}

html.ha-unified .refund-window-table th,
html.ha-unified .refund-window-table td {
    padding: 14px 16px;
    text-align: left;
    border: 1px solid var(--border-color, #e5ebe7);
    vertical-align: top;
}

html.ha-unified .refund-window-table th {
    background: var(--dark-green, #004b04);
    color: #fff !important;
    -webkit-text-fill-color: currentColor !important;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

html.ha-unified .refund-window-table tr:nth-child(even) td {
    background: var(--bg-light, #f5faf6);
}

html.ha-unified .refund-window-table .cell-none {
    color: #b4321e;
    font-weight: 600;
}

html.ha-unified .refund-window-table .cell-partial {
    color: var(--dark-green, #004b04);
    font-weight: 600;
}

html.ha-unified .policy-no-refund-box {
    padding: 22px 24px;
    margin: 16px 0 20px;
    border-radius: var(--border-radius, 12px);
    background: #1a1f1b;
    color: #e8ece9 !important;
    border: 1px solid rgba(248, 113, 113, 0.35);
    box-shadow: inset 4px 0 0 #f87171;
}

html.ha-unified .policy-no-refund-box h4 {
    color: #ffffff !important;
    -webkit-text-fill-color: currentColor !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}

html.ha-unified .policy-no-refund-box ul {
    margin: 0;
    padding-left: 1.25rem;
}

html.ha-unified .policy-no-refund-box li {
    margin-bottom: 6px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9) !important;
    -webkit-text-fill-color: currentColor !important;
}

html.ha-unified .policy-contact-cta {
    margin-top: 36px;
    padding: clamp(22px, 4vw, 28px);
    border-radius: 16px;
    background: linear-gradient(135deg, #003d03 0%, #004b04 50%, #005805 100%);
    border: 1px solid rgba(134, 239, 172, 0.28);
    box-shadow: 0 12px 32px rgba(0, 45, 4, 0.28);
    color: #ffffff !important;
    text-align: left;
}

html.ha-unified .policy-contact-cta__headline {
    margin: 0 0 10px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.15rem, 2.5vw, 1.35rem);
    line-height: 1.3;
    text-align: left;
}

html.ha-unified .policy-contact-cta__headline strong {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-weight: 700;
}

html.ha-unified .policy-contact-cta__lead {
    margin: 0 0 18px;
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.92rem, 2.2vw, 1rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.92) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.92) !important;
    max-width: none;
    text-align: left;
}

html.ha-unified .policy-contact-cta__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

html.ha-unified .policy-contact-cta__chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-family: 'Inter', sans-serif;
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none !important;
    transition:
        background 0.22s ease,
        border-color 0.22s ease,
        transform 0.22s ease,
        box-shadow 0.22s ease;
    -webkit-tap-highlight-color: transparent;
}

html.ha-unified .policy-contact-cta__chip i {
    color: #bbf7d0;
    font-size: 0.82rem;
}

html.ha-unified .policy-contact-cta__chip:hover,
html.ha-unified .policy-contact-cta__chip:focus-visible {
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.55);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    outline: none;
}

html.ha-unified .policy-contact-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 999px;
    background: #ffffff;
    border: none;
    color: var(--dark-green, #004b04) !important;
    -webkit-text-fill-color: var(--dark-green, #004b04) !important;
    font-family: 'Inter', sans-serif;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        background 0.22s ease;
    -webkit-tap-highlight-color: transparent;
}

html.ha-unified .policy-contact-cta__btn i {
    color: #c0392b;
}

html.ha-unified .policy-contact-cta__btn:hover,
html.ha-unified .policy-contact-cta__btn:focus-visible {
    background: #ecfdf5;
    color: var(--dark-green, #004b04) !important;
    -webkit-text-fill-color: var(--dark-green, #004b04) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    outline: none;
}

html.ha-unified .policy-contact-cta p,
html.ha-unified .policy-contact-cta strong {
    color: #ffffff !important;
    -webkit-text-fill-color: currentColor !important;
}

html.ha-unified .policy-contact-cta p {
    margin-bottom: 12px;
    text-align: left;
}

html.ha-unified .policy-contact-cta strong {
    font-weight: 700;
}

html.ha-unified a.policy-contact-cta__chip,
html.ha-unified .policy-contact-cta a.policy-contact-cta__chip {
    display: inline-flex;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-weight: 600;
    text-decoration: none !important;
    word-break: break-word;
}

html.ha-unified a.policy-contact-cta__chip:hover,
html.ha-unified .policy-contact-cta a.policy-contact-cta__chip:hover,
html.ha-unified a.policy-contact-cta__chip:focus-visible,
html.ha-unified .policy-contact-cta a.policy-contact-cta__chip:focus-visible {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

html.ha-unified a.policy-contact-cta__btn,
html.ha-unified .policy-contact-cta a.policy-contact-cta__btn {
    color: var(--dark-green, #004b04) !important;
    -webkit-text-fill-color: var(--dark-green, #004b04) !important;
    background-clip: border-box !important;
    -webkit-background-clip: border-box !important;
}

html.ha-unified a.policy-contact-cta__btn:hover,
html.ha-unified .policy-contact-cta a.policy-contact-cta__btn:hover,
html.ha-unified a.policy-contact-cta__btn:focus-visible,
html.ha-unified .policy-contact-cta a.policy-contact-cta__btn:focus-visible {
    color: var(--dark-green, #004b04) !important;
    -webkit-text-fill-color: var(--dark-green, #004b04) !important;
}

@media (max-width: 768px) {
    html.ha-unified .policy-summary {
        grid-template-columns: 1fr;
    }

    html.ha-unified .policy-meta {
        flex-direction: column;
        align-items: stretch;
        padding: 18px 16px;
    }

    html.ha-unified .policy-meta:hover,
    html.ha-unified .policy-meta:focus-within {
        transform: none;
    }

    html.ha-unified .policy-meta__contact {
        flex-direction: column;
        align-items: stretch;
    }

    html.ha-unified .policy-meta__chip {
        justify-content: center;
        width: 100%;
        box-sizing: border-box;
    }

    html.ha-unified .policy-meta__badges {
        width: 100%;
    }

    html.ha-unified .policy-badge {
        justify-content: center;
        width: 100%;
        box-sizing: border-box;
    }

    html.ha-unified .policy-download-btn {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }

    html.ha-unified .policy-contact-cta__actions {
        flex-direction: column;
        align-items: stretch;
    }

    html.ha-unified .policy-contact-cta__chip,
    html.ha-unified .policy-contact-cta__btn {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }

    html.ha-unified .refund-window-table {
        font-size: 0.88rem;
    }

    html.ha-unified .refund-window-table th,
    html.ha-unified .refund-window-table td {
        padding: 10px 12px;
    }
}
