.ep-legal-page {
    background: var(--ep-surface-muted, #faf8f4);
    min-height: 100vh;
}

.ep-legal-header {
    background: var(--ep-surface, #fff);
}

.ep-tenant-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ep-tenant-brand--sm .ep-tenant-brand__logo img,
.ep-tenant-brand--sm .ep-tenant-brand__logo .ep-app-logo {
    max-height: clamp(1.75rem, 5vw, 2.5rem);
    max-width: min(8.75rem, 40vw);
    object-fit: contain;
}

.ep-tenant-brand--md .ep-tenant-brand__logo img,
.ep-tenant-brand--md .ep-tenant-brand__logo .ep-app-logo {
    max-height: clamp(2.25rem, 6vw, 3.5rem);
    max-width: min(11.25rem, 50vw);
    object-fit: contain;
}

.ep-tenant-brand--lg .ep-tenant-brand__logo img,
.ep-tenant-brand--lg .ep-tenant-brand__logo .ep-app-logo {
    max-height: clamp(2.75rem, 8vw, 4.5rem);
    max-width: min(13.75rem, 60vw);
    object-fit: contain;
}

.ep-tenant-brand__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: grid;
    place-items: center;
    background: var(--ep-primary-pastel, #faf5ec);
    color: var(--ep-primary, #8c2f39);
    font-size: 1.1rem;
}

.ep-tenant-brand__name {
    font-weight: 600;
    color: var(--ep-text, #5d3a3a);
    line-height: 1.25;
    font-size: clamp(0.875rem, 2vw, 1rem);
    overflow: hidden;
    text-overflow: ellipsis;
}

.ep-tenant-brand__subtitle {
    font-size: 0.8125rem;
    color: var(--ep-text-muted, #6b7a8f);
}

.ep-legal-card {
    background: var(--ep-surface, #fff);
    border: 1px solid var(--ep-border, rgba(36, 63, 76, 0.1));
    border-radius: var(--ep-radius, 0.875rem);
    padding: 1.25rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ep-legal-card:hover {
    border-color: rgba(var(--ep-primary-rgb, 55, 96, 114), 0.35);
    box-shadow: 0 8px 24px rgba(36, 63, 76, 0.08);
    transform: translateY(-2px);
}

.ep-legal-card__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: grid;
    place-items: center;
    background: var(--ep-primary-pastel, #faf5ec);
    color: var(--ep-primary, #8c2f39);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.ep-legal-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ep-legal-tabs__item {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--ep-border, rgba(36, 63, 76, 0.1));
    background: var(--ep-surface, #fff);
    color: var(--ep-text-muted, #6b7a8f);
    font-size: 0.8125rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ep-legal-tabs__item:hover,
.ep-legal-tabs__item.is-active {
    color: var(--ep-primary, #8c2f39);
    border-color: rgba(var(--ep-primary-rgb, 55, 96, 114), 0.35);
    background: var(--ep-primary-pastel, #faf5ec);
}

.ep-legal-viewer {
    background: var(--ep-surface, #fff);
    min-height: 70vh;
}

.ep-legal-viewer__frame {
    width: 100%;
    min-height: 70vh;
    border: 0;
    display: block;
}

.ep-legal-consent {
    background: var(--ep-surface-muted, #faf8f4);
    border-color: var(--ep-border, rgba(36, 63, 76, 0.1)) !important;
}

.ep-payment-pos-logo img,
.ep-auth-card-brand .ep-tenant-brand__logo img {
    max-height: var(--ep-logo-payment);
    max-width: min(11.25rem, 50vw);
    object-fit: contain;
}

.ep-tenant-portal-brand__logo {
    max-height: var(--ep-logo-portal);
    max-width: min(13.75rem, 65vw);
    object-fit: contain;
}
