/* share-card.css — Shared toast, share-modal, and portrait-card styles.
   Uses design tokens from autoportofolio-ui.css where possible. */

/* ── Toast ───────────────────────────────────────────────────────────────── */
.ap-toast-container {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    pointer-events: none;
}

.ap-toast {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #1e293b;
    color: #fff;
    padding: 0.6rem 1.15rem;
    border-radius: var(--ap-radius-pill, 999px);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: auto;
}

.ap-toast--visible {
    opacity: 1;
    transform: translateY(0);
}

.ap-toast--success { background: #16a34a; }
.ap-toast--error,
.ap-toast--danger { background: #dc2626; }
.ap-toast--warning { background: #d97706; }
.ap-toast--info    { background: #2563eb; }

/* ── Share Modal ─────────────────────────────────────────────────────────── */
.ap-share-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s;
}

.ap-share-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.ap-share-modal__inner {
    background: var(--ap-color-surface, #fff);
    border-radius: var(--ap-radius-lg, 1.25rem);
    box-shadow: var(--ap-shadow-lg, 0 30px 80px rgba(0, 0, 0, 0.18));
    max-width: 460px;
    width: 92%;
    overflow: hidden;
}

.ap-share-modal__header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--ap-color-border, rgba(15, 23, 42, 0.08));
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ap-share-modal__header h6 {
    margin: 0;
    font-weight: 700;
}

.ap-share-modal__body {
    padding: 1.25rem;
}

.ap-share-modal__subtitle {
    font-size: 0.8rem;
    color: var(--ap-color-muted, #64748b);
    margin-bottom: 1rem;
}

.ap-share-option {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.8rem 1rem;
    border-radius: var(--ap-radius-sm, 0.75rem);
    border: 1.5px solid var(--ap-color-border-strong, rgba(15, 23, 42, 0.16));
    background: var(--ap-color-surface, #fff);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    width: 100%;
    text-decoration: none;
    color: inherit;
    font-size: 0.9rem;
    font-weight: 600;
}

.ap-share-option:hover {
    border-color: var(--ap-color-primary, #0d6efd);
    background: rgba(13, 110, 253, 0.04);
}

.ap-share-option + .ap-share-option {
    margin-top: 0.55rem;
}

.ap-share-option__icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.ap-share-option__label {
    flex: 1;
    text-align: left;
}

.ap-share-option__desc {
    display: block;
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--ap-color-muted, #64748b);
    margin-top: 0.1rem;
}

/* ── Portrait Card (9:12 = 540×720) ─────────────────────────────────────── */
.ap-portrait-card {
    width: 540px;
    height: 720px;
    background: linear-gradient(160deg, #0f172a 0%, #1e3a5f 40%, #0e6655 100%);
    color: #fff;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    position: relative;
    overflow: hidden;
    padding: 32px;
    display: flex;
    flex-direction: column;
}

.ap-portrait-card::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    pointer-events: none;
}

.ap-portrait-card::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -40px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    pointer-events: none;
}

/* Card sub-parts */
.ap-pc-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.ap-pc-logo {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.ap-pc-brand {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.6;
}

.ap-pc-ticker-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.ap-pc-ticker {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

.ap-pc-name {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 2px;
}

.ap-pc-signal-pill {
    padding: 8px 18px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ap-pc-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.ap-pc-stat {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.ap-pc-stat__label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.5;
    margin-bottom: 4px;
}

.ap-pc-stat__value {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.2;
}

.ap-pc-stat__sub {
    font-size: 0.7rem;
    opacity: 0.5;
    margin-top: 2px;
}

.ap-pc-chart-area {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.ap-pc-chart-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.6;
    margin-bottom: 12px;
}

.ap-pc-chart-canvas {
    flex: 1;
    width: 100%;
}

.ap-pc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ap-pc-footer-text {
    font-size: 0.65rem;
    opacity: 0.4;
}

.ap-pc-footer-url {
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0.6;
}
