/* ==========================================================================
   Legal / Policy pages (Privacy, Terms, Payment, Cancellation)
   ========================================================================== */

.legal-page {
    background: var(--bg-light);
}

.legal-hero {
    position: relative;
    min-height: 240px;
    display: flex;
    align-items: flex-end;
    color: #fff;
    overflow: hidden;
}

.legal-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, #0b3022 0%, #164a36 45%, #1a3a28 100%);
    z-index: 0;
}

.legal-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 30%, rgba(197, 160, 89, 0.18) 0 2px, transparent 3px),
        radial-gradient(circle at 80% 40%, rgba(255, 255, 255, 0.08) 0 2px, transparent 3px);
}

.legal-hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    padding-top: calc(var(--header-height) + 16px);
    padding-bottom: 28px;
}

.legal-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3.2vw, 2.2rem);
    font-weight: 800;
    margin: 8px 0 8px;
    line-height: 1.2;
}

.legal-hero-sub {
    margin: 0;
    max-width: 560px;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

.legal-body {
    padding: 36px 0 48px;
}

.legal-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    align-items: start;
}

.legal-card {
    background: #fff;
    border: 1px solid #e8ebe9;
    border-radius: 14px;
    padding: 28px 28px 32px;
    box-shadow: 0 4px 18px rgba(11, 48, 34, 0.05);
}

.legal-card h2 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 28px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(197, 160, 89, 0.35);
}

.legal-card h2:first-child {
    margin-top: 0;
}

.legal-card h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin: 20px 0 8px;
}

.legal-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0 0 12px;
}

.legal-card ul,
.legal-card ol {
    margin: 0 0 14px;
    padding-left: 18px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.legal-card li {
    margin-bottom: 6px;
}

.legal-card a {
    color: var(--primary);
    font-weight: 600;
}

.legal-card a:hover {
    color: var(--accent-hover);
}

.legal-note {
    background: #fcf8f0;
    border: 1px solid rgba(197, 160, 89, 0.35);
    border-left: 4px solid var(--accent);
    border-radius: 10px;
    padding: 14px 16px;
    margin: 16px 0;
    font-size: 0.88rem;
    color: var(--text-dark);
    line-height: 1.55;
}

.legal-cancel-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 18px;
    font-size: 0.88rem;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid #e8ebe9;
}

.legal-cancel-table th,
.legal-cancel-table td {
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid #e8ebe9;
}

.legal-cancel-table th {
    background: #eef5f1;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.legal-cancel-table tr:last-child td {
    border-bottom: none;
}

.legal-cancel-table .warn {
    color: #b91c1c;
    font-weight: 700;
}

.legal-pay-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 16px 0 20px;
}

.legal-pay-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--bg-light);
    border: 1px solid #e8ebe9;
    border-radius: 12px;
    padding: 14px;
}

.legal-pay-item i {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eef5f1, #f7f1e4);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.legal-pay-item strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.88rem;
    color: var(--primary);
    margin-bottom: 2px;
}

.legal-pay-item span {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.legal-side {
    position: sticky;
    top: calc(var(--header-height) + 16px);
}

.legal-side-card {
    background: #fff;
    border: 1px solid #e8ebe9;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 14px;
}

.legal-side-card h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 12px;
}

.legal-side-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.84rem;
    font-weight: 600;
    margin-bottom: 4px;
    transition: background 0.2s ease;
}

.legal-side-link:hover,
.legal-side-link.active {
    background: #eef5f1;
    color: var(--primary);
}

.legal-side-link i {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.legal-side-cta {
    background: linear-gradient(145deg, var(--primary), #0d4a35);
    color: #fff;
    border-radius: 14px;
    padding: 18px;
}

.legal-side-cta h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin: 0 0 8px;
}

.legal-side-cta p {
    font-size: 0.82rem;
    opacity: 0.9;
    line-height: 1.45;
    margin: 0 0 12px;
}

.legal-side-cta a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 10px 14px;
    border-radius: 8px;
}

.legal-side-cta a:hover {
    background: var(--accent);
    color: var(--primary);
}

.legal-updated {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px dashed #e8ebe9;
}

.legal-pay-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.legal-pay-form-grid .full {
    grid-column: 1 / -1;
}

.legal-pay-form-grid label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.legal-pay-form-grid label span {
    color: #b91c1c;
}

.legal-pay-form-grid input,
.legal-pay-form-grid textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #dce5e0;
    border-radius: 10px;
    font: inherit;
    font-size: 0.95rem;
    color: var(--text-dark);
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.legal-pay-form-grid input:focus,
.legal-pay-form-grid textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(11, 48, 34, 0.12);
}

.pay-form-panel {
    margin: 0 0 28px;
    padding: 22px 22px 20px;
    border-radius: 16px;
    background:
        linear-gradient(160deg, rgba(238, 245, 241, 0.95), rgba(255, 255, 255, 0.98) 42%),
        #fff;
    border: 1px solid #d9e6df;
    box-shadow: 0 10px 28px rgba(11, 48, 34, 0.06);
}

.pay-form-head {
    margin-bottom: 18px;
}

.pay-form-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary);
    background: #e8f3ed;
    border: 1px solid #cfe3d8;
    border-radius: 999px;
    padding: 6px 12px;
    margin-bottom: 12px;
}

.pay-form-head h2 {
    margin: 0 0 6px;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: var(--primary);
}

.pay-form-head p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.pay-amount-wrap {
    position: relative;
}

.pay-amount-wrap .pay-currency {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    color: var(--primary);
    pointer-events: none;
}

.pay-amount-wrap input {
    padding-left: 32px;
}

.pay-form-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed #d9e6df;
}

.pay-trust-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

.pay-trust-list li {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pay-trust-list i {
    font-size: 1.15rem;
    color: var(--primary);
    opacity: 0.85;
}

.pay-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 200px;
    padding: 13px 22px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(145deg, var(--primary), #0d4a35);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(11, 48, 34, 0.22);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.pay-submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(11, 48, 34, 0.28);
}

.pay-submit-btn:disabled {
    opacity: 0.75;
    cursor: wait;
}

.pay-alert {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.88rem;
    line-height: 1.45;
    border: 1px solid transparent;
}

.pay-alert.is-ok {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.pay-alert.is-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.pay-success-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 0 0 22px;
    padding: 16px 18px;
    border-radius: 14px;
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    border: 1px solid #a7f3d0;
}

.pay-success-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #059669;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.pay-success-banner strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: #065f46;
    margin-bottom: 4px;
}

.pay-success-banner p {
    margin: 0;
    font-size: 0.88rem;
    color: #047857;
    line-height: 1.45;
}

@media (max-width: 600px) {
    .legal-pay-form-grid {
        grid-template-columns: 1fr;
    }

    .legal-pay-form-grid .full {
        grid-column: auto;
    }

    .pay-form-panel {
        padding: 16px;
    }

    .pay-form-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .pay-submit-btn {
        width: 100%;
    }
}

