/* Hub da conta — sheets laterais modernos */

.pub-account-hub {
    position: fixed;
    inset: 0;
    z-index: 1080;
    pointer-events: none;
}
.pub-account-hub:not([hidden]) {
    pointer-events: auto;
}
.pub-account-hub[hidden] { display: none !important; }

.pub-account-hub__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 10, 16, 0.62);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.28s ease;
}
.pub-account-hub.is-open .pub-account-hub__backdrop { opacity: 1; }

.pub-account-sheet {
    position: absolute;
    top: 0;
    right: 0;
    width: min(440px, 100%);
    height: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(165deg, #1c1c1f 0%, #141416 100%);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: -24px 0 64px rgba(0, 0, 0, 0.5);
    transform: translateX(104%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    color: #fff;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-sizing: border-box;
}
.pub-account-hub.is-open .pub-account-sheet:not([hidden]) {
    transform: translateX(0);
}

.pub-account-sheet__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.25rem 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.pub-account-sheet__kicker {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pub-primary-2, #FF8A3D);
}
.pub-account-sheet__title {
    margin: 0.15rem 0 0;
    font-size: 1.35rem;
    font-weight: 700;
}
.pub-account-sheet__close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}
.pub-account-sheet__close:hover {
    background: #232326;
    transform: scale(1.04);
}

.pub-account-sheet__body {
    flex: 1;
    overflow-y: auto;
    padding: 1.15rem 1.25rem max(1.75rem, calc(1rem + env(safe-area-inset-bottom, 0px)));
    -webkit-overflow-scrolling: touch;
}

.pub-account-avatar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.pub-account-avatar__preview {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 1.75rem;
    color: rgba(255, 255, 255, 0.55);
}
.pub-account-avatar__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pub-account-form .form-label {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.85rem;
}
.pub-account-form .form-control,
.pub-account-form .form-select {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 0.85rem;
    min-height: 46px;
}
.pub-account-form .form-control:focus,
.pub-account-form .form-select:focus {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(var(--pub-primary-rgb), 0.55);
    box-shadow: 0 0 0 0.2rem rgba(var(--pub-primary-rgb), 0.18);
    color: #fff;
}
.pub-account-form .form-select option { color: #111; }

.pub-account-divider {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 1.25rem 0 1rem;
}
.pub-account-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0.85rem;
}

.pub-account-addresses {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.pub-account-addr {
    display: flex;
    align-items: stretch;
    gap: 0.35rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
}
.pub-account-addr.is-active {
    border-color: rgba(var(--pub-primary-rgb), 0.65);
    background: rgba(var(--pub-primary-rgb), 0.12);
}
.pub-account-addr__main {
    flex: 1;
    text-align: left;
    border: 0;
    background: transparent;
    color: #fff;
    padding: 0.65rem 0.75rem;
    cursor: pointer;
}
.pub-account-addr__main strong {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.15rem;
}
.pub-account-addr__main span {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.55);
}
.pub-account-addr__del {
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.45);
    padding: 0 0.7rem;
    cursor: pointer;
}
.pub-account-addr__del:hover {
    color: #ff6b6b;
}

.pub-account-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: rgba(255, 255, 255, 0.55);
}
.pub-account-empty i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.75rem;
    opacity: 0.7;
}

.pub-account-card {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    padding: 0.85rem;
    margin-bottom: 0.65rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.pub-account-card__media {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}
.pub-account-card__body { min-width: 0; flex: 1; }
.pub-account-card__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 650;
}
.pub-account-card__meta {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
}
.pub-account-card__price {
    margin: 0.35rem 0 0;
    font-weight: 700;
}
.pub-account-card__actions {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pub-coupon-card {
    padding: 1rem 1.1rem;
    margin-bottom: 0.75rem;
    border-radius: 1.1rem;
    background: linear-gradient(135deg, rgba(var(--pub-primary-rgb), 0.18), rgba(255, 255, 255, 0.05));
    border: 1px dashed rgba(var(--pub-primary-rgb), 0.45);
}
.pub-coupon-card.is-disabled {
    opacity: 0.55;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
}
.pub-coupon-card__code {
    font-family: ui-monospace, monospace;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.pub-coupon-card__badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.pub-order-card {
    display: block;
    padding: 1rem;
    margin-bottom: 0.65rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: inherit;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.pub-order-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(var(--pub-primary-rgb), 0.35);
    color: inherit;
}
.pub-order-card__top {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}
.pub-order-card__status {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary, var(--brand-primary-dark, #E85D04));
}

.pub-fav-btn {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pub-fav-btn.is-on {
    background: rgba(var(--pub-primary-rgb), 0.25);
    color: #ff8a4c;
}
.pub-menu-item__fav {
    align-self: center;
}

body.pub-account-open { overflow: hidden; }

@media (max-width: 575.98px) {
    .pub-account-sheet {
        width: 100%;
        border-left: 0;
        border-radius: 1.25rem 1.25rem 0 0;
        top: auto;
        bottom: 0;
        height: min(92vh, calc(100% - env(safe-area-inset-top, 0px)));
        max-height: calc(100dvh - env(safe-area-inset-top, 0px));
        padding-top: 0;
        transform: translateY(104%);
    }
    .pub-account-hub.is-open .pub-account-sheet:not([hidden]) {
        transform: translateY(0);
    }
}
