﻿.user-page-main {
    width: min(1240px, calc(100% - 32px));
    margin: 34px auto 88px;
}

.user-profile {
    display: grid;
    gap: 24px;
}

.user-profile [hidden] {
    display: none !important;
}

.user-profile-shell {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    min-height: min(720px, calc(100vh - 210px));
}

.user-profile-sidebar {
    position: sticky;
    top: calc(var(--site-header-height, 140px) + 34px);
    z-index: 4;
    align-self: start;
    display: grid;
    gap: 8px;
    max-height: calc(100vh - var(--site-header-height, 140px) - 56px);
    overflow: auto;
    scrollbar-gutter: stable;
    border: 1px solid rgba(16, 32, 56, 0.08);
    border-radius: 16px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 34px rgba(16, 32, 56, 0.06);
    backdrop-filter: blur(14px);
}

.user-profile-sidebar-title {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.user-profile-menu-button {
    position: relative;
    width: 100%;
    min-height: 46px;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 0 13px 0 16px;
    color: var(--brand-deep);
    background: transparent;
    font: inherit;
    font-weight: 850;
    text-align: left;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.user-profile-menu-button:hover,
.user-profile-menu-button:focus-visible {
    border-color: rgba(42, 96, 171, 0.24);
    background: #f4f7fc;
    outline: none;
}

.user-profile-menu-button.is-active {
    color: #ffffff;
    border-color: var(--brand);
    background: var(--brand);
    box-shadow: 0 10px 22px rgba(42, 96, 171, 0.22);
}

.user-profile-menu-button.is-active::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 50%;
    width: 3px;
    height: 18px;
    border-radius: 99px;
    background: currentColor;
    transform: translateY(-50%);
}

.user-profile-content,
.user-profile-home {
    display: grid;
    gap: 24px;
    min-width: 0;
}

.user-profile-content {
    align-content: start;
}

.user-profile-content > [data-profile-section] {
    scroll-margin-top: calc(var(--site-header-height, 140px) + 34px);
}

.user-profile-header {
    max-width: 680px;
}

.user-profile-kicker,
.user-profile-label {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.user-profile-title {
    margin: 0;
    color: var(--brand-deep);
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1;
    letter-spacing: -0.055em;
}

.user-profile-subtitle {
    max-width: 560px;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.65;
}

.user-profile-card,
.user-favorites,
.user-invoices,
.user-chat {
    border: 1px solid rgba(16, 32, 56, 0.08);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(16, 32, 56, 0.06);
}

.user-favorites,
.user-invoices,
.user-chat {
    min-height: 360px;
}

.user-profile-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    gap: 18px;
    align-items: end;
    padding: 20px;
}

.user-profile-value {
    margin: 0;
    color: var(--brand-deep);
    font-size: 1.05rem;
    font-weight: 850;
}

.user-profile-logout {
    justify-content: center;
}

.user-favorites {
    padding: 20px;
}

.user-invoices {
    display: grid;
    gap: 16px;
    padding: 20px;
}

.user-invoice-filters {
    display: grid;
    grid-template-columns: minmax(220px, 1.8fr) minmax(160px, 1fr) minmax(160px, 1fr) auto;
    gap: 12px;
    align-items: end;
    border: 1px solid rgba(16, 32, 56, 0.08);
    border-radius: 14px;
    padding: 16px;
    background: #f7f9fc;
}

.user-invoice-filters label {
    display: grid;
    gap: 7px;
    color: var(--brand-deep);
    font-size: 0.86rem;
    font-weight: 850;
}

.user-invoice-filters input,
.user-invoice-filters select {
    min-height: 46px;
    border: 1px solid rgba(16, 32, 56, 0.14);
    border-radius: 10px;
    padding: 0 12px;
    color: var(--brand-deep);
    background: #ffffff;
    font: inherit;
    font-weight: 750;
}

.user-invoices-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(16, 32, 56, 0.08);
    border-radius: 14px;
}

.user-invoices-table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
    color: var(--brand-deep);
}

.user-invoices-table th,
.user-invoices-table td {
    padding: 15px 16px;
    border-bottom: 1px solid rgba(16, 32, 56, 0.08);
    text-align: left;
    vertical-align: middle;
}

.user-invoices-table th {
    color: var(--muted);
    background: #ffffff;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.user-invoices-table td span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.user-invoices-table tbody tr:last-child td {
    border-bottom: 0;
}

.user-invoice-status {
    display: inline-flex !important;
    width: max-content;
    margin: 0 !important;
    border-radius: 999px;
    padding: 6px 11px;
    color: #1f2937 !important;
    background: #e5e7eb;
    font-size: 0.82rem !important;
    font-weight: 900 !important;
}

.user-invoice-status-issued {
    color: #155e75 !important;
    background: #cffafe;
}

.user-invoice-status-credited {
    color: #166534 !important;
    background: #dcfce7;
}

.user-invoice-status-canceled,
.user-invoice-status-receipt_canceled {
    color: #991b1b !important;
    background: #fee2e2;
}

.user-invoice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.user-invoice-muted {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 750;
}

.user-chat {
    display: grid;
    gap: 16px;
    padding: 20px;
}

.user-chat-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
}

.user-favorites-title {
    margin: 0 0 16px;
    color: var(--brand-deep);
    font-size: 1.35rem;
    letter-spacing: -0.03em;
}

.user-favorites-empty {
    margin: 0;
    color: var(--muted);
    font-weight: 750;
}

.user-favorites-empty[hidden] {
    display: none;
}

.user-favorites-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.user-favorites-list .product-card[role="button"] {
    cursor: pointer;
}

.user-favorites-list .product-card[role="button"]:focus-visible {
    outline: 3px solid rgba(42, 96, 171, 0.28);
    outline-offset: 3px;
}

.profile-product-detail {
    display: grid;
    gap: 16px;
}

.profile-product-detail-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
}

.profile-product-detail-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.profile-product-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid rgba(16, 32, 56, 0.1);
}

.profile-product-tabs button {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 12px 12px 0 0;
    padding: 12px 16px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 900;
    cursor: pointer;
}

.profile-product-tabs button:hover,
.profile-product-tabs button:focus-visible {
    color: var(--brand-deep);
    background: #f7f9fc;
}

.profile-product-tabs button.is-active {
    border-color: rgba(16, 32, 56, 0.1);
    border-bottom-color: #ffffff;
    background: #ffffff;
    color: var(--brand-deep);
}

.profile-product-tab-panel {
    display: grid;
    gap: 16px;
}

.profile-product-tab-panel[hidden] {
    display: none;
}

.profile-product-detail-hero {
    display: grid;
    grid-template-columns: minmax(180px, 0.34fr) minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
    border: 1px solid rgba(16, 32, 56, 0.08);
    border-radius: 14px;
    padding: 14px;
    background: #f7f9fc;
}

.profile-product-detail-hero img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    border-radius: 12px;
    background: #e8eef7;
}

.profile-product-detail-hero h3 {
    margin: 0;
    color: var(--brand-deep);
    font-size: clamp(1.5rem, 3vw, 2.3rem);
    line-height: 1.05;
}

.profile-product-detail-hero p:not(.user-profile-kicker) {
    margin: 12px 0 0;
    color: var(--muted);
    font-weight: 750;
    line-height: 1.55;
}

.profile-product-detail-hero strong {
    display: block;
    margin-top: 18px;
    color: var(--brand-deep);
    font-size: 1.45rem;
}

.profile-product-detail-hero strong span {
    color: var(--muted);
    font-size: 0.9rem;
}

.profile-product-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.profile-product-detail-item {
    display: grid;
    gap: 8px;
    min-width: 0;
    border: 1px solid rgba(16, 32, 56, 0.08);
    border-radius: 12px;
    padding: 13px;
    background: #ffffff;
}

.profile-product-detail-item span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.profile-product-detail-item strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--brand-deep);
    font-size: 0.98rem;
}

.profile-reservation-calendar {
    display: grid;
    gap: 14px;
    border: 1px solid rgba(16, 32, 56, 0.08);
    border-radius: 14px;
    padding: 16px;
    background: #ffffff;
}

.profile-reservation-calendar h3 {
    margin: 0;
    color: var(--brand-deep);
    font-size: 1.2rem;
}

.profile-reservation-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 850;
}

.profile-reservation-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.profile-reservation-legend i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.profile-reservation-legend .is-occupied,
.profile-reservation-day.is-occupied {
    background: #ffe1db;
    color: #9f2418;
}

.profile-reservation-legend .is-free,
.profile-reservation-day.is-free {
    background: #dff8e8;
    color: #075f35;
}

.profile-reservation-months {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.profile-reservation-month {
    display: grid;
    gap: 10px;
    min-width: 0;
    border: 1px solid rgba(16, 32, 56, 0.08);
    border-radius: 12px;
    padding: 12px;
}

.profile-reservation-month h4 {
    margin: 0;
    color: var(--brand-deep);
    font-size: 1rem;
}

.profile-reservation-weekdays,
.profile-reservation-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.profile-reservation-weekdays span {
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
}

.profile-reservation-day {
    display: grid;
    min-width: 0;
    aspect-ratio: 1;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 0.78rem;
    font-weight: 900;
}

.profile-reservation-day.is-empty {
    background: transparent;
}

.profile-reservation-day.is-today {
    border-color: var(--brand);
}

.profile-reservation-status {
    display: inline-flex;
    width: fit-content;
    margin: 10px 0 0;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 0.76rem;
    font-weight: 900;
    line-height: 1;
}

.profile-reservation-status.is-active {
    border: 1px solid rgba(22, 101, 52, 0.14);
    background: #ecfdf3;
    color: #166534;
}

.profile-reservation-status.is-cancelled {
    border: 1px solid rgba(185, 28, 28, 0.18);
    background: #fff1f1;
    color: #b91c1c;
}

.profile-payments {
    display: grid;
    gap: 14px;
    border: 1px solid rgba(16, 32, 56, 0.08);
    border-radius: 14px;
    padding: 16px;
    background: #ffffff;
}

.profile-payments h3 {
    margin: 0;
    color: var(--brand-deep);
    font-size: 1.2rem;
}

.profile-payment-list {
    display: grid;
    gap: 10px;
}

.profile-payment-row {
    display: grid;
    grid-template-columns: 1.15fr 1fr 0.78fr 0.76fr 1fr 0.72fr 1fr auto;
    gap: 10px;
    align-items: center;
    border: 1px solid rgba(16, 32, 56, 0.08);
    border-radius: 12px;
    padding: 13px;
    background: #f7f9fc;
}

.profile-payment-row div {
    display: grid;
    min-width: 0;
    gap: 6px;
}

.profile-payment-row span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.profile-payment-row strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--brand-deep);
    font-size: 0.95rem;
}

.profile-payment-status {
    width: fit-content;
    border-radius: 999px;
    padding: 5px 8px;
    font-size: 0.82rem;
}

.profile-payment-status.is-pago {
    background: #dcfce7;
    color: #166534;
}

.profile-payment-status.is-previsto,
.profile-payment-status.is-pagamento-pendente,
.profile-payment-status.is-vence-hoje {
    background: #eef2ff;
    color: #1e3a8a;
}

.profile-payment-status.is-em-atraso,
.profile-payment-status.is-falhou {
    background: #ffedd5;
    color: #9a3412;
}

.profile-payment-status.is-reembolsado {
    background: #f3e8ff;
    color: #6b21a8;
}

.profile-payment-status.is-cancelado {
    background: #fee2e2;
    color: #991b1b;
}

.profile-payment-action {
    justify-self: end;
}

.profile-payment-action .button {
    white-space: nowrap;
}

.profile-payment-empty {
    margin: 0;
    border: 1px solid rgba(16, 32, 56, 0.08);
    border-radius: 12px;
    padding: 14px;
    color: var(--muted);
    font-weight: 850;
    background: #f7f9fc;
}

.profile-wallet-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 16px;
    align-items: start;
}

.profile-wallet-panel,
.profile-payment-method-form {
    display: grid;
    gap: 14px;
    border: 1px solid rgba(16, 32, 56, 0.08);
    border-radius: 14px;
    padding: 16px;
    background: #ffffff;
}

.profile-wallet-panel-head,
.profile-payment-method-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.profile-payment-method-list,
.profile-payment-overview {
    display: grid;
    gap: 10px;
}

.profile-payment-products-panel {
    margin-bottom: 16px;
}

.profile-payment-product-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 10px;
    padding-bottom: 2px;
}

.profile-payment-product-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
    border: 1px solid rgba(16, 32, 56, 0.1);
    border-radius: 12px;
    padding: 12px;
    background: #f7f9fc;
}

.profile-payment-product-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    color: var(--brand-deep);
    text-align: left;
    cursor: pointer;
}

.profile-payment-product-main {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.profile-payment-product-count {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 10px;
    background: #eaf2ff;
    color: #1754a6;
    font-weight: 950;
}

.profile-payment-product-main strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.96rem;
    font-weight: 950;
}

.profile-payment-product-main span,
.profile-payment-product-status {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 850;
}

.profile-payment-product-status {
    justify-self: end;
    max-width: 120px;
    border-radius: 999px;
    padding: 7px 10px;
    background: #eef4fb;
}

.profile-payment-product-shell.is-active,
.profile-payment-product-shell:hover {
    border-color: rgba(30, 85, 170, 0.34);
    background: #eef5ff;
    box-shadow: 0 10px 24px rgba(17, 57, 120, 0.08);
}

.profile-payment-history-remove {
    justify-self: end;
    border: 1px solid rgba(185, 28, 28, 0.2);
    border-radius: 10px;
    padding: 8px 11px;
    background: #fff7f7;
    color: #9f1239;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 850;
}

.profile-payment-history-remove:hover {
    background: #ffe4e6;
}

.profile-payment-product-history {
    display: grid;
    gap: 12px;
}

.profile-payment-history-head h3 {
    margin: 2px 0 4px;
    color: var(--brand-deep);
    font-size: 1.1rem;
}

.profile-payment-history-head span {
    color: var(--muted);
    font-weight: 850;
}

.profile-payment-reservation-summary {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    border: 1px solid rgba(16, 32, 56, 0.08);
    border-radius: 12px;
    padding: 12px;
    background: #fff;
}

.profile-payment-reservation-summary div {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.profile-payment-reservation-summary span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
}

.profile-payment-reservation-summary strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--brand-deep);
}

.profile-payment-method-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    border: 1px solid rgba(16, 32, 56, 0.08);
    border-radius: 12px;
    padding: 12px;
    background: #f7f9fc;
}

.profile-payment-method-brand {
    display: grid;
    place-items: center;
    width: 48px;
    height: 32px;
    border-radius: 8px;
    background: var(--brand-deep);
    color: #ffffff;
    font-weight: 950;
}

.profile-payment-method-card strong,
.profile-payment-summary-card strong {
    color: var(--brand-deep);
}

.profile-payment-method-card p {
    margin: 4px 0 0;
    color: var(--muted);
    font-weight: 800;
}

.profile-payment-method-badge {
    border-radius: 999px;
    padding: 6px 9px;
    background: #dcfce7;
    color: #166534;
    font-size: 0.78rem;
    font-weight: 950;
}

.profile-payment-summary-card {
    display: grid;
    gap: 6px;
    border: 1px solid rgba(16, 32, 56, 0.08);
    border-radius: 12px;
    padding: 13px;
    background: #f7f9fc;
}

.profile-payment-summary-card span {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 950;
    text-transform: uppercase;
}

.profile-payment-method-element {
    min-height: 72px;
}

.has-profile-payment-modal {
    overflow: hidden;
}

.profile-payment-failure-modal {
    position: fixed;
    top: var(--site-header-height, 142px);
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 999;
    display: grid;
    align-items: center;
    justify-items: center;
    padding: 20px;
    overflow: auto;
}

.profile-payment-failure-modal[hidden] {
    display: none;
}

.profile-payment-failure-backdrop {
    position: absolute;
    inset: 0;
    background: rgb(6 27 70 / 0.46);
    backdrop-filter: blur(3px);
}

.profile-payment-failure-dialog {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(100%, 520px);
    max-height: calc(100vh - var(--site-header-height, 142px) - 40px);
    overflow: auto;
    gap: 16px;
    border: 1px solid rgba(16, 32, 56, 0.12);
    border-radius: 16px;
    padding: 20px;
    background: #ffffff;
    box-shadow: 0 24px 80px rgb(6 27 70 / 0.24);
}

.profile-payment-failure-head,
.profile-payment-failure-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.profile-payment-failure-head h3 {
    margin: 0;
    color: var(--brand-deep);
    font-size: 1.35rem;
}

.profile-payment-failure-close {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(16, 32, 56, 0.12);
    border-radius: 999px;
    color: var(--brand-deep);
    font-size: 1.25rem;
    font-weight: 900;
    background: #ffffff;
    cursor: pointer;
}

.profile-payment-failure-message {
    margin: 0;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 12px 14px;
    color: #991b1b;
    font-weight: 850;
    background: #fef2f2;
}

.profile-payment-failure-methods {
    display: grid;
    gap: 10px;
}

.profile-payment-failure-method {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border: 1px solid rgba(16, 32, 56, 0.1);
    border-radius: 12px;
    padding: 12px;
    background: #f7f9fc;
    cursor: pointer;
}

.profile-payment-failure-method input {
    width: 18px;
    height: 18px;
    accent-color: var(--brand-blue);
}

.profile-payment-failure-method span {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.profile-payment-failure-method strong {
    color: var(--brand-deep);
    font-size: 0.98rem;
}

.profile-payment-failure-method small {
    color: var(--muted);
    font-weight: 800;
}

.profile-reservation-cancel,
.profile-reservation-remove {
    width: 100%;
    border: 1px solid rgba(185, 28, 28, 0.18);
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff7f7;
    color: #991b1b;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 900;
    cursor: pointer;
}

.profile-reservation-remove {
    border-color: rgba(16, 32, 56, 0.1);
    background: #f8fafc;
    color: var(--brand-deep);
}

.profile-reservation-cancel:disabled,
.profile-reservation-remove:disabled {
    cursor: wait;
    opacity: 0.7;
}

.product-card.is-reservation-cancelled {
    border-color: rgba(185, 28, 28, 0.16);
}

.user-chat-message {
    border: 1px solid rgba(196, 30, 30, 0.24);
    border-radius: 12px;
    padding: 12px 14px;
    color: #b91c1c;
    background: #fff1f1;
    font-weight: 750;
}

.user-chat-message[hidden] {
    display: none;
}

.user-chat-thread {
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 260px;
    max-height: 52vh;
    overflow: auto;
    border: 1px solid rgba(16, 32, 56, 0.08);
    border-radius: 14px;
    padding: 14px;
    background: #f7f9fc;
}

.user-chat-bubble {
    display: grid;
    gap: 6px;
    max-width: min(620px, 92%);
    border-radius: 14px;
    padding: 12px 14px;
    color: var(--brand-deep);
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(16, 32, 56, 0.06);
}

.user-chat-bubble.is-user {
    justify-self: end;
    color: #ffffff;
    background: var(--brand);
}

.user-chat-bubble p,
.user-chat-bubble small {
    margin: 0;
}

.user-chat-bubble p {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    unicode-bidi: plaintext;
}

.user-chat-bubble a {
    color: inherit;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.user-chat-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto auto;
    gap: 10px;
    align-items: end;
}

.user-chat-form textarea {
    min-height: 50px;
    resize: vertical;
    unicode-bidi: plaintext;
}

@media (max-width: 900px) {
    .user-profile-shell {
        grid-template-columns: 1fr;
        gap: 18px;
        min-height: 0;
    }

    .user-profile-sidebar {
        top: calc(var(--site-header-height, 72px) + 24px);
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-height: calc(100vh - var(--site-header-height, 72px) - 42px);
        overflow: auto;
    }

    .user-profile-sidebar-title {
        grid-column: 1 / -1;
    }

    .user-profile-card,
    .user-favorites-list,
    .profile-product-detail-hero,
    .profile-product-detail-grid,
    .profile-wallet-grid,
    .profile-payment-product-shell,
    .profile-payment-product-item,
    .profile-payment-reservation-summary,
    .profile-payment-row,
    .profile-payment-method-card,
    .profile-reservation-months,
    .user-invoice-filters,
    .user-chat-form {
        grid-template-columns: 1fr;
    }

    .user-chat-header {
        display: grid;
    }
}

@media (max-width: 560px) {
    .user-page-main {
        width: min(100% - 24px, 1240px);
        margin-top: 24px;
    }

    .user-profile-sidebar {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 10px;
        border-radius: 14px;
        scrollbar-gutter: auto;
    }

    .user-profile-sidebar-title {
        display: none;
    }

    .user-profile-menu-button {
        flex: 0 0 auto;
        width: auto;
        min-width: 116px;
        text-align: center;
        padding: 0 14px;
    }

    .user-profile-menu-button.is-active::before {
        display: none;
    }
}
