/* ==================================
   ПРОФИЛЬ — LOTTI (/profile/)
   Как ProfileView / OrderHistoryView в iOS: градиент + белые карточки на листе.
   ================================== */

.pf-header { max-width: 720px; margin: 0 auto; box-sizing: border-box; }
.pf-header .back-btn { color: rgba(255,255,255,.88); }

.pf-sheet {
    max-width: 720px;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 28px 20px calc(48px + env(safe-area-inset-bottom));
    min-height: calc(100dvh - 130px);
}

.pf-section { margin-bottom: 22px; animation: pfSlideIn .5s cubic-bezier(.34,1.56,.64,1) both; }
.pf-section:nth-child(2) { animation-delay: .06s; }
.pf-section:nth-child(3) { animation-delay: .12s; }

@keyframes pfSlideIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}

.pf-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--lotti-text-sub);
    margin: 0 0 12px;
}

/* ── Карточка-кнопка со строками ──────────────────────────────────────── */

.pf-card {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 3px 8px rgba(0,0,0,.05);
    text-align: left;
    font: inherit;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    transition: transform .1s ease;
}
.pf-card:active { transform: scale(.98); }
.pf-card:focus-visible { outline: 3px solid rgba(248,119,166,.45); outline-offset: 2px; }

.pf-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    position: relative;
}
.pf-row::after {
    content: "";
    position: absolute;
    left: 70px; right: 0; bottom: 0;
    height: 1px;
    background: rgba(97,56,81,.08);
}
.pf-row--last::after { display: none; }

.pf-row__icon {
    width: 40px; height: 40px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    background: rgba(168,216,234,.22);
    font-size: 18px;
}
.pf-row__icon--danger { background: rgba(224,86,122,.10); }

.pf-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pf-row__text {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--lotti-text-title);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pf-row__text.is-empty { color: var(--lotti-text-sub); font-weight: 500; }
.pf-row__sub { font-size: 12px; color: var(--lotti-text-sub); }
#pf-verified { color: #2EB36B; font-weight: 600; }
.pf-danger { color: #E0567A; }

.pf-chevron {
    width: 8px; height: 8px;
    flex-shrink: 0;
    border-right: 2px solid rgba(148,115,137,.4);
    border-top: 2px solid rgba(148,115,137,.4);
    transform: rotate(45deg);
    margin-right: 2px;
}

.pf-hint { font-size: 12px; line-height: 1.35; color: rgba(148,115,137,.9); margin: 8px 4px 0; }

.pf-toast {
    margin: 10px 0 0;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(46,179,107,.12);
    color: #1F8A50;
    font-size: 14px;
    font-weight: 600;
}
.pf-toast.is-error { background: rgba(224,86,122,.12); color: #C23F63; }

/* ── История заказов (карточка как OrderHistoryCard) ──────────────────── */

.pf-history { display: flex; flex-direction: column; gap: 4px; }

.pf-order {
    position: relative;
    display: block;
    padding-top: 12px;
    color: inherit;
    text-decoration: none;
    animation: pfSlideIn .5s cubic-bezier(.34,1.56,.64,1) both;
    -webkit-tap-highlight-color: transparent;
}
.pf-order__body {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 26px 16px 16px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,.06);
    transition: transform .1s ease;
}
.pf-order.is-link { cursor: pointer; }
.pf-order.is-link:active .pf-order__body { transform: scale(.98); }
.pf-order.is-link:focus-visible { outline: none; }
.pf-order.is-link:focus-visible .pf-order__body { box-shadow: 0 0 0 3px rgba(248,119,166,.45); }

.pf-order__badge {
    position: absolute;
    top: 0; left: 20px;
    z-index: 1;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}
.pf-order__badge--success    { background: #2EB36B; }
.pf-order__badge--cancelled  { background: #ED5252; }
.pf-order__badge--inProgress { background: #ED8542; }

.pf-order__emoji {
    width: 48px; height: 48px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 14px;
    background: rgba(168,216,234,.22);
    font-size: 24px;
}
.pf-order__text { flex: 1; min-width: 0; }
.pf-order__title { margin: 0 0 4px; font-size: 15px; font-weight: 600; color: var(--lotti-text-title); }
.pf-order__details {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--lotti-text-sub);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pf-order__amount { flex-shrink: 0; font-size: 16px; font-weight: 700; color: #70ADF5; white-space: nowrap; }

/* Загрузка / пусто / ошибка */
.pf-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px 12px 8px; gap: 8px; }
.pf-state__emoji { font-size: 64px; line-height: 1; margin-bottom: 8px; }
.pf-state__title { margin: 0; font-size: 22px; font-weight: 700; color: var(--lotti-text-title); }
.pf-state__sub { margin: 0; font-size: 15px; font-weight: 500; color: var(--lotti-text-sub); line-height: 1.35; }
.pf-order-cta { margin-top: 14px; max-width: 320px; text-decoration: none; }
.pf-retry { margin-top: 10px; max-width: 220px; }

.pf-spinner {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 3px solid rgba(255,181,200,.35);
    border-top-color: var(--lotti-btn-to);
    animation: pfSpin .8s linear infinite;
}
@keyframes pfSpin { to { transform: rotate(360deg); } }

/* ── Шторка «Мои данные» ──────────────────────────────────────────────── */

body.pf-no-scroll { overflow: hidden; }

.pf-edit { position: fixed; inset: 0; z-index: 900; }
.pf-edit[hidden] { display: none; }
.pf-edit__dim {
    position: absolute; inset: 0;
    background: rgba(40,20,35,.38);
    opacity: 0;
    transition: opacity .25s ease;
}
.pf-edit__panel {
    position: absolute;
    left: 50%; bottom: 0;
    width: 100%; max-width: 560px;
    box-sizing: border-box;
    transform: translate(-50%, 100%);
    transition: transform .28s cubic-bezier(.2,.8,.2,1);
    background: var(--lotti-sheet-bg);
    border-radius: 28px 28px 0 0;
    padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 30px rgba(97,56,81,.18);
    max-height: 92dvh;
    overflow-y: auto;
}
.pf-edit.is-open .pf-edit__dim { opacity: 1; }
.pf-edit.is-open .pf-edit__panel { transform: translate(-50%, 0); }

.pf-edit__handle { width: 36px; height: 4px; border-radius: 2px; background: rgba(148,115,137,.25); margin: 0 auto 14px; }
.pf-edit__close {
    position: absolute; top: 14px; right: 16px;
    width: 32px; height: 32px;
    border: none; border-radius: 50%;
    background: rgba(148,115,137,.12);
    color: var(--lotti-text-sub);
    font-size: 14px;
    cursor: pointer;
}
.pf-edit__title { margin: 6px 40px 6px 0; font-size: 22px; font-weight: 800; color: var(--lotti-text-title); }
.pf-edit__sub { margin: 0 0 16px; font-size: 14px; color: var(--lotti-text-sub); line-height: 1.35; }

.pf-fields { background: #fff; border-radius: 18px; box-shadow: 0 3px 12px rgba(97,56,81,.06); overflow: hidden; }
.pf-field {
    display: flex; align-items: center; gap: 10px;
    padding: 13px 16px;
    border: 2px solid transparent;
    border-bottom: 1px solid rgba(97,56,81,.07);
    cursor: text;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.pf-field--last { border-bottom: none; }
.pf-field.is-focused { border-color: rgba(255,181,200,.60); box-shadow: inset 0 0 0 1px rgba(255,181,200,.30); }
.pf-field.is-invalid { border-color: rgba(224,86,122,.55); box-shadow: inset 0 0 0 1px rgba(224,86,122,.20); }
.pf-field__icon { font-size: 16px; opacity: .7; width: 20px; text-align: center; flex-shrink: 0; }
.pf-field__body { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; }
.pf-field__label { font-size: 12px; font-weight: 600; color: rgba(148,115,137,.9); line-height: 1.2; }
.pf-field input {
    flex-basis: 100%;
    margin-top: 2px;
    border: none; background: none; outline: none;
    font: inherit; font-size: 16px;
    color: var(--lotti-text-title);
    min-width: 0;
}
.pf-field input::placeholder { color: rgba(148,115,137,.55); }
.pf-field__error { flex-basis: 100%; font-size: 12px; color: #E0567A; line-height: 1.3; }
.pf-field__error:empty { display: none; }

.pf-edit__note { margin: 10px 4px 0; font-size: 12px; color: rgba(148,115,137,.9); line-height: 1.35; }
.pf-edit__note:empty { display: none; }
.pf-edit__error { margin: 10px 4px 0; font-size: 13px; color: #E0567A; }
.pf-edit__error:empty { display: none; }
#pf-edit-submit { margin-top: 16px; }
.pf-edit__disclaimer { margin: 12px 4px 0; font-size: 11px; color: rgba(148,115,137,.8); text-align: center; }

@media (prefers-reduced-motion: reduce) {
    .pf-section, .pf-order { animation: none; }
    .pf-edit__panel, .pf-edit__dim { transition: none; }
}

/* ── «Удалить аккаунт» — маленький серый текст внизу, без карточки и красного ── */
.pf-delete-wrap {
    margin: 40px 0 0;
    text-align: center;
}
.pf-delete-link {
    display: inline-block;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--lotti-text-sub);
    text-decoration: none;
}
.pf-delete-link:hover,
.pf-delete-link:focus-visible { text-decoration: underline; }
