/* ==========================================================================
   New design (Carrot, Oct 2026): profile (screen 22)
   Navy initials square, name and "role · company", three light-blue counters, the account details in
   the spec-table style, support note, privacy / log out / delete. Values from the delivered prototype
   (app.css .profile-*). The log out / delete confirmations use the design's bottom sheet.
   Loaded only for Preview users.
   ========================================================================== */

.s2-profile {
    background: #fff;
    font-family: var(--s2-font);
}

.s2-profile-top {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 16px 18px;
}
.s2-profile-avatar {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--s2-indigo);
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    animation: s2TileWipe 0.7s var(--s2-ease-in-out) 0.15s both;
}
.s2-profile-name {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--s2-indigo);
}
.s2-profile-sub {
    margin-top: 2px;
    font-size: 13px;
    color: var(--s2-text-muted);
}

/* ---------- Counters ---------- */
.s2-profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin: 0 16px;
}
.s2-profile-stat {
    padding: 14px 8px;
    background: var(--s2-sky-bg);
    text-align: center;
    animation: s2LogoRise 0.5s var(--s2-ease-out) both;
}
.s2-profile-stat:nth-child(2) { animation-delay: 0.08s; }
.s2-profile-stat:nth-child(3) { animation-delay: 0.16s; }
.s2-count-up {
    display: block;
    font-size: 22px;
    font-weight: 700;
    line-height: normal;
    color: var(--s2-indigo);
    font-variant-numeric: tabular-nums;
}
.s2-profile-stat small {
    font-size: 11px;
    color: var(--s2-blue);
}

/* ---------- Details (same table as the product's specs) ---------- */
.s2-profile-fields .s2-pdp-spec-row {
    animation: s2LogoRise 0.5s var(--s2-ease-out) calc(0.3s + var(--d, 0) * 45ms) both;
}

.s2-profile-note {
    margin: 18px 16px 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--s2-text-muted);
}
.s2-profile-note a {
    font-weight: 600;
    color: var(--s2-indigo);
    text-decoration: underline;
}

.s2-profile-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px 16px 24px;
    text-align: center;
}
.s2-profile-delete {
    margin-top: 6px;
    padding: 8px;
    border: 0;
    background: none;
    font-family: var(--s2-font);
    font-size: 12px;
    font-weight: 600;
    color: var(--s2-red);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

/* ---------- Confirmation sheets ---------- */
.s2-sheet .s2-sheet-title {
    line-height: 1.35;
}
.s2-sheet-text {
    margin: 0 0 4px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--s2-text-muted);
}
.s2-sheet-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}
.s2-btn.s2-btn-danger {
    border-color: var(--s2-red);
    background: var(--s2-red);
}
.s2-btn.s2-btn-danger:disabled {
    border-color: var(--s2-border);
    background: var(--s2-border);
    color: #fff;
    transform: none;
    cursor: default;
}

@keyframes s2TileWipe {
    from { clip-path: inset(0 0 100% 0); }
    to   { clip-path: inset(0 0 0 0); }
}

@media (prefers-reduced-motion: reduce) {
    .s2-profile-avatar, .s2-profile-stat, .s2-profile-fields .s2-pdp-spec-row { animation: none; }
}
