/* ========================================================================
   iphone-chat-frame.css -- iPhone Messages frame for marketing hero PNGs

   Renders the .iphone-frame container at the template image's native
   resolution (770x1630). The template PNG provides the visible bezel,
   status bar, Dynamic Island, input row, and home indicator as a single
   composited image (background-image). Dynamic content (chat header +
   message stack) renders inside .iphone-frame__cutout, absolutely
   positioned over the template's transparent screen region.

   The cutout coordinates below are calibrated against the transparent
   rectangle in iphone-frame-template.png (770x1630). The screen region
   begins below the status-bar / Dynamic Island and ends above the input
   row / home indicator. These values are pixel-exact against the
   template image -- changing the template requires re-calibration.

   Font stack: web-safe only (no @font-face). This eliminates the
   font-loading race in the headless rasterization step -- both the
   dev preview and the screenshot use the same fallback chain.
   ======================================================================== */

.iphone-frame {
    position: relative;
    width: 770px;
    height: 1630px;
    background-image: url("/img/iphone-frame-template.png");
    background-repeat: no-repeat;
    background-size: 770px 1630px;
    background-position: 0 0;
    /* Web-safe font stack -- load-bearing for headless screenshot fidelity. */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "SF Pro Text", system-ui, sans-serif;
    color: #000;
}

/* Cutout: the transparent screen region in the template image. */
.iphone-frame__cutout {
    position: absolute;
    top: 190px;
    left: 50px;
    width: 670px;
    /* Bottom edge at y=1425 (190+1235), ~6px above the template's input-row
       separator hairline at y=1431. Keeps chat content clear of the camera /
       App Store / iMessage / mic icon row (y=1452+) and the home indicator. */
    height: 1235px;
    overflow: hidden;
    box-sizing: border-box;
    padding: 0;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

/* Header strip: chat name + optional subtitle, centered above the separator. */
.iphone-frame__header {
    flex: 0 0 auto;
    padding: 28px 24px 12px;
    text-align: center;
}

.iphone-frame__chat-name {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.15;
    color: #000;
}

.iphone-frame__subtitle {
    margin-top: 6px;
    font-size: 27px;
    font-weight: 400;
    line-height: 1.2;
    color: #8e8e93;
}

.iphone-frame__separator {
    flex: 0 0 auto;
    margin: 8px 0 0;
    border: 0;
    border-top: 1px solid #d8d8dc;
    width: 100%;
}

/* Message stack: column of bubbles and dividers, scroll hidden via cutout overflow. */
.iphone-frame__messages {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 18px 24px;
    overflow: hidden;
}

/* Bubble base styles. iMessage register: 18px corner radius with a 6px
   asymmetric corner on the tail side. Tail side flips for Sent vs Received. */
.chat-bubble {
    display: inline-block;
    max-width: 80%;
    padding: 10px 14px;
    font-size: 42px;
    line-height: 1.3;
    word-wrap: break-word;
}

.chat-bubble--received {
    align-self: flex-start;
    background-color: #e9e9eb;
    color: #000000;
    border-radius: 18px 18px 18px 6px;
}

.chat-bubble--sent {
    align-self: flex-end;
    color: #ffffff;
    background-image: linear-gradient(180deg, #007aff 0%, #0064d2 100%);
    border-radius: 18px 18px 6px 18px;
}

/* Divider: centered, small, muted-gray timestamp / date label. */
.chat-divider {
    align-self: center;
    margin: 6px 0;
    font-size: 30px;
    font-weight: 600;
    color: #8e8e93;
    text-align: center;
}

/* Windows-outcome footer: a stack of cards beneath the iMessage thread showing what the
   reader gets on their PC (searchable archive, court-ready PDF). Visually distinct from the
   iMessage register -- a light Windows-surface panel, not a blue/gray chat bubble. Pinned to
   the bottom of the cutout (flex: 0 0 auto) so it never scrolls out of the screenshot frame.
   Rendered only when IPhoneChatFrameModel.Outcomes is non-empty, so divorce/harassment frames
   are unaffected. */
.iphone-frame__outcomes {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px 18px 28px;
    border-top: 1px solid #d8d8dc;
    background: #f5f6f8;
}

.outcome-band {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 20px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #d8d8dc;
    border-left: 6px solid #0067c0; /* Windows accent blue */
}

.outcome-band__label {
    font-size: 34px;
    font-weight: 700;
    line-height: 1.15;
    color: #1f2024;
}

.outcome-band__caption {
    font-size: 27px;
    font-weight: 400;
    line-height: 1.25;
    color: #5a5d66;
}
