/* drop.css — Dark mode design system for Drops */

:root {
    --drop-bg: #121212;
    --drop-surface: #404040;
    --drop-surface-raised: #1a1a1a;
    --drop-surface-raised-alt: #222222;
    --drop-accent: #FFF310; 
    --drop-accent-tint: rgba(255, 252, 16, 0.1);
    --drop-accent-faint: rgba(255, 252, 16, 0.3);
    --drop-text: #F5F5F7;
    --drop-text-muted: #F5F5F7;
    --drop-border: #333333;
    --drop-error: #ef4444;
    --drop-font: 'Satoshi', sans-serif;
}

/* ── Utility ────────────────────────────────────────────── */
.drop-hidden { display: none !important; }
body.drop-no-scroll { overflow: hidden; }

/* ── Type scale ─────────────────────────────────────────── */
.drop-type-display  { font-size: 48px; font-weight: 900; }
.drop-type-title    { font-size: 33px; font-weight: 900; }
.drop-type-subtitle { font-size: 24px; font-weight: 900; }
.drop-type-heading  { font-size: 17px; font-weight: 700; }
/* body: 16px / 500 — inherits from body.drop-page, no class needed */
.drop-type-body-sm  { font-size: 14px; }
.drop-type-caption  { font-size: 14px; }

body.drop-page *,
body.drop-page *::before,
body.drop-page *::after {
    box-sizing: border-box;
}

body.drop-page {
    background-color: var(--drop-bg) !important;
    color: var(--drop-text);
    font-family: var(--drop-font);
    font-size: 16px;
    font-weight: 500;
    touch-action: manipulation;
    overscroll-behavior: none;
    min-height: 100vh;
}

body.drop-page input,
body.drop-page textarea,
body.drop-page button,
body.drop-page select {
    font-size: inherit;
    font-weight: inherit;
}

.drop-container {
    min-height: calc(100vh - 56px);
    max-width: 500px;
    margin: 0 auto;
}

.drop-container-with-bar {
    padding-bottom: 100px;
}

/* ── Header ──────────────────────────────────────────────── */
.drop-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--drop-bg);
    border-bottom: 1px solid var(--drop-border);
    padding: 16px 16px;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drop-header-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.drop-header-logo {
    width: 40px;
    height: auto;
}

.drop-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.drop-header-btn {
    background: none;
    border: none;
    color: var(--drop-text-muted);
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
}

.drop-header-btn:hover {
    color: var(--drop-text);
    background: var(--drop-surface);
}

.drop-btn-primary-sm {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border: none;
    border-radius: 9999px;
    background: var(--drop-accent);
    color: #000;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s;
    text-decoration: none;
}

.drop-btn-primary-sm:hover {
    opacity: 0.9;
}

/* ── Title row (below header on drop page) ──────────────── */
.drop-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 16px 8px;
}

.drop-title-name {
    color: var(--drop-text);
    font-weight: 900;
    letter-spacing: -0.36px;
}

.drop-title-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.drop-icon-btn {
    background: none;
    border: none;
    color: var(--drop-text);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: color 0.15s;
}

.drop-icon-btn:hover {
    color: var(--drop-accent);
}

/* ── Pill buttons ────────────────────────────────────────── */
.drop-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 9999px;
    background: var(--drop-accent);
    color: #000000;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s;
    width: 100%;
}

.drop-btn-primary:hover {
    opacity: 0.9;
}

.drop-btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.drop-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1.5px solid var(--drop-border);
    border-radius: 9999px;
    background: transparent;
    color: var(--drop-text-muted);
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    width: 100%;
}

.drop-btn-secondary:hover {
    border-color: var(--drop-accent);
    color: var(--drop-accent);
}

.drop-btn-ghost {
    background: none;
    border: none;
    color: var(--drop-text-muted);
    font-family: inherit;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 8px;
    transition: color 0.15s;
}

.drop-btn-ghost:hover {
    color: var(--drop-accent);
}

/* ── Single card ────────────────────────────────────────── */
.drop-card {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 8px;
    position: relative;
}

.drop-card img {
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
    display: block;
    border-radius: 12px;
}

/* Placeholder (shown during generation) */
.drop-card-placeholder {
    max-width: 500px;
    margin: 0 auto;
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--drop-surface-raised);
    border-radius: 12px;
    margin-left: 8px;
    margin-right: 8px;
}

/* ── Action row ─────────────────────────────────────────── */
.drop-action-row {
    max-width: 500px;
    margin: 0 auto;
    padding: 8px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.drop-action-row-caption {
    text-align: center;
    color: var(--drop-text-muted);
    padding: 4px 0 0;
}

/* Primary Send button — yellow pill, same width as retry+delete row */
.drop-action-send-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    gap: 8px;
    padding: 10px 32px;
    border: none;
    border-radius: 9999px;
    background: var(--drop-accent);
    color: #000;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s;
}

.drop-action-send-primary:hover {
    opacity: 0.9;
}

.drop-action-send-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.drop-action-send-primary .material-icons {
    font-size: 20px;
}

/* Send button glow nudge */
.drop-action-send-primary.nudge {
    animation: dropSendNudge 2s ease-in-out infinite;
}

@keyframes dropSendNudge {
    0%   { box-shadow: 0 0 0 0 transparent; transform: scale(1); }
    50%  { box-shadow: 0 0 24px var(--drop-accent-faint), 0 0 48px var(--drop-accent-tint); transform: scale(1.02); }
    100% { box-shadow: 0 0 0 0 transparent; transform: scale(1); }
}

/* Secondary action buttons row */
.drop-action-row-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.drop-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--drop-border);
    border-radius: 9999px;
    background: none;
    color: var(--drop-text-muted);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.drop-action-btn:hover {
    border-color: var(--drop-text-muted);
    color: var(--drop-text);
}

.drop-action-btn .material-icons {
    font-size: 18px;
}

.drop-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Empty state ─────────────────────────────────────────── */
.drop-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
}

.drop-empty-icon {
    font-size: 56px;
    color: var(--drop-surface);
    margin-bottom: 16px;
}

.drop-empty h3 {
    font-family: inherit;
    margin-bottom: 8px;
    color: var(--drop-text);
}

.drop-empty p {
    font-family: inherit;
    color: var(--drop-text-muted);
    margin-bottom: 24px;
}

.drop-empty .drop-btn-primary {
    max-width: 240px;
}

/* ── Style picker cards (drops home) ─────────────────────── */
.style-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
}

.style-card {
    background: var(--drop-surface);
    border-radius: 12px;
    padding: 14px 12px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    text-align: center;
}

.style-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--drop-accent-faint);
}

.style-card.suggested {
    border: 2px solid var(--drop-accent);
    box-shadow: 0 0 20px var(--drop-accent-faint);
}

.style-card:active {
    transform: scale(0.97);
}

.style-card-icon {
    font-size: 28px;
    color: var(--drop-accent);
}

/* ── Name prompt modal ───────────────────────────────────── */
.drop-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.drop-modal {
    background: #1a1a1a;
    border-radius: 20px;
    padding: 28px 24px;
    max-width: 380px;
    width: 100%;
}

.drop-modal h3 {
    font-family: inherit;
    color: var(--drop-text);
    margin-bottom: 16px;
    text-align: center;
}

.drop-modal .drop-btn-primary {
    padding: 10px 20px;
}

.drop-modal input[type="text"] {
    width: 100%;
    padding: 10px 16px;
    border: 1.5px solid var(--drop-border);
    border-radius: 12px;
    background: var(--drop-surface);
    color: var(--drop-text);
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    margin-bottom: 16px;
}

.drop-modal input[type="text"]::placeholder {
    color: var(--drop-text-muted);
}

.drop-modal input[type="text"]:focus {
    border-color: var(--drop-accent);
}

/* ── Back link ──────────────────────────────────────────── */
.drop-back-link {
    color: var(--drop-text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 8px 8px 8px 0;
}

.drop-back-link .material-icons {
    font-size: 24px;
}

/* ── Hero (drops home) ──────────────────────────────────── */
.drop-hero {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 16px 16px;
}

.drop-hero-logo {
    width: 90px;
    height: auto;
    flex-shrink: 0;
}

.drop-hero-title {
    color: var(--drop-text);
    line-height: 1.1;
    margin: 0;
    letter-spacing: -0.46px;
}

.drop-hero-splash {
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    min-height: calc(100dvh - 80px);
    text-align: right;
    padding: 48px 24px;
    gap: 0;
}

.drop-hero-splash .drop-hero-title {
    color: var(--drop-accent);
    line-height: 0.95;
    letter-spacing: -1.5px;
    max-width: 280px;
}

.drop-hero-splash .drop-hero-logo {
    width: 140px;
    margin-top: 24px;
}

/* ── Returning user compact header ─────────────────────── */
.drop-home-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 8px;
}

.drop-home-logo-sm {
    width: 48px;
    height: auto;
}

/* ── Helper text (first-time user) ─────────────────────── */
.drop-helper-text {
    text-align: center;
    color: var(--drop-text-muted);
    padding: 16px;
    opacity: 0.7;
}

/* ── Chevron toggle ────────────────────────────────────── */
.drop-chevron-toggle {
    display: flex;
    justify-content: center;
    padding: 8px 0;
    cursor: pointer;
}

.drop-chevron-toggle .material-icons {
    color: var(--drop-accent);
    font-size: 32px;
    transition: transform 0.2s;
}

/* ── User drops list (drops home) ───────────────────────── */
.drop-list-section {
    padding: 8px 16px 16px;
}

.drop-list-heading {
    color: var(--drop-text);
    margin-bottom: 12px;
}

.drop-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drop-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--drop-surface);
    border-radius: 12px;
    text-decoration: none;
}


.drop-list-item-label {
    font-weight: 500;
    color: var(--drop-text);
    letter-spacing: -0.28px;
}

.drop-list-item-label strong {
    font-weight: 700;
}

/* ── Image grid (drops home) ───────────────────────────── */
.drop-image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.drop-image-grid-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 4px;
}

.drop-image-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── "Create your own" card ────────────────────────────── */
.style-card-custom {
    border: 2px dashed var(--drop-accent-faint);
    background: transparent;
}

.style-card-custom:hover {
    border-color: var(--drop-accent);
}

/* ── Error state ────────────────────────────────────────── */
.drop-error {
    padding: 48px 24px;
    text-align: center;
}

.drop-error-icon {
    font-size: 48px;
    color: var(--drop-surface);
}

.drop-error-title {
    margin-top: 12px;
    color: var(--drop-text);
}

.drop-error-msg {
    color: var(--drop-text-muted);
    margin-top: 8px;
}

.drop-error .drop-btn-secondary {
    margin-top: 16px;
    max-width: 200px;
}

/* ── Drawer ─────────────────────────────────────────────── */
body.drop-drawer-open {
    overflow: hidden;
}

.drop-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 40;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.drop-drawer-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
}

.drop-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--drop-surface-raised);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    max-height: 95vh;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drop-drawer.open {
    transform: translateY(0);
}

.drop-drawer.collapsed {
    max-height: 0;
    overflow: hidden;
}

.drop-drawer-handle {
    width: 48px;
    height: 4px;
    background: var(--drop-surface);
    border-radius: 2px;
    margin: 12px auto 8px;
}

.drop-drawer-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--drop-border);
    background: var(--drop-surface-raised-alt);
}

.drop-drawer-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drop-drawer-title {
    color: var(--drop-text);
    margin: 0;
}

.drop-drawer-close {
    background: none;
    border: none;
    color: var(--drop-text-muted);
    cursor: pointer;
    padding: 0;
}

.drop-drawer-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.drop-drawer-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--drop-surface);
    border: 1px solid var(--drop-border);
    color: var(--drop-text);
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
}

.drop-drawer-input:focus {
    border-color: var(--drop-accent);
}

.drop-drawer-input::placeholder {
    color: var(--drop-text-muted);
}

.drop-drawer-label {
    color: var(--drop-text-muted);
    font-family: inherit;
    margin-bottom: 8px;
}

.drop-drawer-footer {
    padding: 16px;
    border-top: 1px solid var(--drop-border);
    background: var(--drop-surface-raised);
}

.drop-drawer-go-btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: var(--drop-accent);
    color: #000;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.15s;
}

.drop-drawer-go-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Suggestion chips ──────────────────────────────────── */
.drop-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.drop-chip {
    display: inline-block;
    padding: 8px 16px;
    border: 1.5px solid var(--drop-border);
    border-radius: 20px;
    background: transparent;
    color: var(--drop-text-muted);
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    text-align: left;
}

.drop-chip:hover,
.drop-chip.active {
    border-color: var(--drop-accent);
    color: var(--drop-accent);
    background: var(--drop-accent-tint);
}

.drop-chip .material-icons {
    font-size: 16px;
    vertical-align: middle;
    margin-right: 4px;
}

.drop-chip-create {
}

.drop-chip-create .material-icons {
}

/* ── Cast pills ────────────────────────────────────────── */
.drop-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.drop-pill {
    padding: 8px 16px;
    border: 1.5px solid var(--drop-border);
    border-radius: 20px;
    background: transparent;
    color: var(--drop-text-muted);
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.drop-pill:disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.drop-pill.selected {
    border-color: var(--drop-accent);
    color: var(--drop-accent);
    background: var(--drop-accent-tint);
}

/* ── Selfie step ───────────────────────────────────────── */
.drop-selfie-camera-body {
    position: relative;
    background: #000;
    max-height: 50dvh;
    overflow: hidden;
}

.drop-selfie-video {
    width: 100%;
    max-height: 50dvh;
    object-fit: cover;
    display: block;
    transform: scaleX(-1);
}

.drop-selfie-canvas {
    display: none;
}

.drop-selfie-preview {
    width: 100%;
    max-height: 50dvh;
    object-fit: cover;
}

.drop-selfie-error {
    padding: 40px 20px;
    text-align: center;
    color: var(--drop-error);
}

.drop-selfie-error-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.drop-selfie-error-msg {
    font-weight: 500;
    margin-bottom: 16px;
}

.drop-selfie-retry-camera-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    background: var(--drop-accent);
    color: #000;
    font-weight: 500;
    cursor: pointer;
}

.drop-selfie-controls {
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.drop-selfie-capture-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--drop-accent);
    border: 4px solid var(--drop-border);
    box-shadow: 0 0 0 2px var(--drop-accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drop-selfie-capture-btn .material-icons {
    color: #000;
    font-size: 28px;
}

.drop-selfie-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px 0;
}

.drop-selfie-divider-line {
    flex: 1;
    height: 1px;
    background: var(--drop-border);
}

.drop-selfie-divider-text {
    color: var(--drop-text-muted);
    font-family: inherit;
}

.drop-selfie-upload-btn {
    width: 100%;
    padding: 14px;
    border: 1.5px solid var(--drop-border);
    border-radius: 10px;
    background: transparent;
    color: var(--drop-text);
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.drop-selfie-upload-btn .material-icons {
    font-size: 20px;
    color: var(--drop-text-muted);
}

.drop-selfie-file-input {
    display: none;
}

/* ── Selfie crop ───────────────────────────────────────── */
.drop-selfie-crop-body {
    position: relative;
    background: #000;
    max-height: 50dvh;
    overflow: hidden;
}

.drop-selfie-crop-image {
    display: block;
    max-width: 100%;
}

.drop-selfie-crop-actions {
    padding: 12px 16px;
    display: flex;
    gap: 12px;
}

/* ── Selfie review ─────────────────────────────────────── */
.drop-selfie-review {
    padding: 12px 16px;
    display: flex;
    gap: 12px;
}

/* ── Selfie spinner ────────────────────────────────────── */
.drop-selfie-spinner {
    padding: 40px 20px;
    text-align: center;
}

.drop-selfie-spinner-icon {
    width: 48px;
    height: 48px;
    border: 4px solid var(--drop-accent);
    border-top-color: transparent;
    border-radius: 50%;
    animation: drop-spin 1s linear infinite;
    margin: 0 auto 20px;
}

.drop-selfie-spinner h3 {
    font-family: inherit;
    color: var(--drop-text);
}

.drop-selfie-spinner p {
    color: var(--drop-text-muted);
    margin-top: 8px;
}

/* Shared button styles for selfie actions (crop/review) */
.drop-selfie-btn-cancel {
    flex: 1;
    padding: 12px;
    border: 1.5px solid var(--drop-border);
    border-radius: 10px;
    background: transparent;
    color: var(--drop-text);
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
}

.drop-selfie-btn-confirm {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: var(--drop-accent);
    color: #000;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.drop-selfie-btn-confirm .material-icons {
    font-size: 18px;
}

/* ── Progress bar ──────────────────────────────────────── */
.drop-progress {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 16px;
    background: var(--drop-surface-raised);
    border-top: 1px solid var(--drop-border);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.drop-progress.visible {
    transform: translateY(0);
}

.drop-progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.drop-progress-spinner {
    width: 32px;
    height: 32px;
    border: 4px solid var(--drop-accent);
    border-top-color: transparent;
    border-radius: 50%;
    animation: drop-spin 1s linear infinite;
    flex-shrink: 0;
}

.drop-progress-info {
    flex: 1;
}

.drop-progress-message {
    color: var(--drop-text);
}

.drop-progress-track {
    width: 100%;
    margin-top: 8px;
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
    background: var(--drop-border);
}

.drop-progress-bar {
    height: 8px;
    border-radius: 4px;
    width: 0;
    transition: width 0.3s ease;
    background: var(--drop-accent);
}

/* ── Chat panel (generation messaging) ──────────────────── */
.drop-chat-panel {
    padding: 12px 16px;
    background: var(--drop-surface-raised);
    border-bottom: 1px solid var(--drop-border);
    overflow-y: auto;
    max-height: 30vh;
}

.drop-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drop-chat-bubble {
    max-width: 85%;
    border-radius: 16px;
    padding: 10px 14px;
    line-height: 1.4;
    animation: drop-chat-appear 0.3s ease;
}

@keyframes drop-chat-appear {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.drop-chat-outgoing {
    background: var(--drop-surface);
    color: var(--drop-text);
    align-self: flex-end;
}

.drop-chat-incoming {
    background: var(--drop-accent);
    color: #000;
    align-self: flex-start;
    font-weight: 600;
}

.drop-chat-image {
    padding: 6px;
    background: var(--drop-accent);
}

.drop-chat-image img {
    border-radius: 12px;
    max-width: 120px;
    display: block;
}

/* ── Toast ──────────────────────────────────────────────── */
.drop-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--drop-surface-raised-alt);
    border: 1px solid var(--drop-border);
    color: var(--drop-text);
    padding: 10px 20px;
    border-radius: 8px;
    font-family: inherit;
    z-index: 100;
}

/* ── Share modal (bottom sheet) ─────────────────────────── */
.drop-share-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 50;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.drop-share-sheet {
    background: var(--drop-surface-raised);
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 500px;
    font-family: inherit;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.drop-share-handle {
    width: 48px;
    height: 4px;
    background: var(--drop-border);
    border-radius: 2px;
    margin: 12px auto 8px;
}

.drop-share-body {
    padding: 0 20px 20px;
}

.drop-share-body h3 {
    color: var(--drop-text);
    margin-bottom: 16px;
}

.drop-share-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drop-share-option {
    padding: 14px 16px;
    border: 1.5px solid var(--drop-border);
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
}

.drop-share-option-icon {
    font-size: 24px;
    color: var(--drop-text-muted);
}

.drop-share-option-icon.accent {
    color: var(--drop-accent);
}

.drop-share-option-title {
    font-weight: 600;
    color: var(--drop-text);
}

.drop-share-option-desc {
    color: var(--drop-text-muted);
}

.drop-share-cancel {
    margin-top: 14px;
    width: 100%;
    padding: 10px;
    border: none;
    background: none;
    color: var(--drop-text-muted);
    cursor: pointer;
}

/* ── Retry modal ────────────────────────────────────────── */
.drop-retry-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drop-retry-dialog {
    background: var(--drop-surface-raised);
    border-radius: 16px;
    max-width: 340px;
    width: calc(100% - 32px);
    font-family: inherit;
    padding: 20px;
}

.drop-retry-dialog h3 {
    color: var(--drop-text);
    margin-bottom: 12px;
}

.drop-retry-input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--drop-border);
    border-radius: 10px;
    font-family: inherit;
    background: var(--drop-surface);
    color: var(--drop-text);
    box-sizing: border-box;
}

.drop-retry-input::placeholder {
    color: var(--drop-text-muted);
}

.drop-retry-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.drop-retry-cancel {
    flex: 1;
    padding: 12px;
    border: 1.5px solid var(--drop-border);
    border-radius: 10px;
    background: transparent;
    color: var(--drop-text);
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
}

.drop-retry-submit {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: var(--drop-accent);
    color: #000;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
}

/* ── Loading overlay (on grid items during retry) ──────── */
.drop-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.drop-loading-overlay-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--drop-accent-faint);
    border-top-color: var(--drop-accent);
    border-radius: 50%;
    animation: drop-spin 1s linear infinite;
}

.drop-loading-overlay-text {
    color: var(--drop-text);
    font-family: inherit;
    margin-top: 10px;
}

.drop-spin {
    animation: drop-spin 0.8s linear infinite;
}

/* ── Modal subtitle ─────────────────────────────────────── */
.drop-modal-subtitle {
    color: var(--drop-text-muted);
    margin-bottom: 16px;
    text-align: center;
}

/* ── Loading spinner ─────────────────────────────────────── */
.drop-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.drop-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--drop-surface);
    border-top-color: var(--drop-accent);
    border-radius: 50%;
    animation: drop-spin 0.8s linear infinite;
}

@keyframes drop-spin {
    to { transform: rotate(360deg); }
}

/* ── Bottom zone (fixed container for bar + bubbles) ───── */
.drop-bottom-zone {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* ── @alt message bar ───────────────────────────────────── */
.drop-alt-bar {
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--drop-bg);
    border-top: 1px solid var(--drop-border);
}

.drop-alt-bar-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--drop-surface-raised);
    border: 1.5px solid var(--drop-surface);
    border-radius: 14px;
    padding: 12px 14px;
    cursor: pointer;
    transition: border-color 0.15s;
    min-height: 48px;
}

.drop-alt-bar-box:hover {
    border-color: var(--drop-surface);
}

/* Bar input (textarea that acts as display text when idle, editable when composing) */
.drop-alt-bar-input {
    flex: 1;
    line-height: 1.4;
    color: var(--drop-text-muted);
    background: none;
    border: none;
    outline: none;
    resize: none;
    font-family: inherit;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
}

.drop-alt-bar.composing .drop-alt-bar-input {
    color: var(--drop-text);
    cursor: text;
}

.drop-alt-bar.generating .drop-alt-bar-input {
    color: var(--drop-text-muted);
    font-style: italic;
    cursor: default;
}

/* Send button (replaces the + icon) */
.drop-alt-bar-send {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--drop-accent);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: opacity 0.15s;
}

.drop-alt-bar-send:disabled {
    opacity: 0.4;
    cursor: default;
}

.drop-alt-bar-send .material-icons {
    font-size: 20px;
    color: #000;
}

/* Stop pulsing when composing or generating */
.drop-alt-bar.composing .drop-alt-bar-box,
.drop-alt-bar.generating .drop-alt-bar-box {
    animation: none;
}

.drop-alt-bar.composing {
    animation: none;
}

.drop-alt-bar.generating {
    animation: none;
}

.drop-alt-bar.generating {
    display: none;
}

/* ── Options panel (above bar) ──────────────────────────── */
.drop-alt-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 19;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.drop-alt-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
}

.drop-alt-options {
    background: var(--drop-surface-raised);
    padding: 0 16px 12px;
    width: 100%;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drop-alt-options.visible {
    opacity: 1;
    transform: translateY(0);
}

.drop-alt-options-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0 10px;
}

.drop-alt-options-title {
    color: var(--drop-text);
}

.drop-alt-options-close {
    background: none;
    border: none;
    color: var(--drop-text-muted);
    cursor: pointer;
    padding: 4px;
}

.drop-alt-options-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Bounce + glow entrance animation */
.drop-alt-bar.entrance {
    animation: dropAltBarBounce 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.drop-alt-bar.entrance .drop-alt-bar-box {
    animation: dropAltBarGlow 1.5s ease-out forwards;
}

@keyframes dropAltBarBounce {
    0%   { transform: translateY(100%); }
    50%  { transform: translateY(-10px); }
    70%  { transform: translateY(4px); }
    85%  { transform: translateY(-2px); }
    100% { transform: translateY(0); }
}

@keyframes dropAltBarGlow {
    0%   { border-color: var(--drop-accent); box-shadow: 0 0 30px var(--drop-accent-faint), 0 0 60px var(--drop-accent-tint); }
    40%  { border-color: var(--drop-accent); box-shadow: 0 0 40px var(--drop-accent-faint), 0 0 80px var(--drop-accent-tint); }
    100% { border-color: var(--drop-border); box-shadow: none; }
}

/* Repeating pulse for empty/idle */
.drop-alt-bar.pulsing .drop-alt-bar-box {
    animation: dropAltBarPulse 2s ease-in-out infinite;
}

@keyframes dropAltBarPulse {
    0%   { border-color: var(--drop-border); box-shadow: 0 0 0 0 transparent; }
    50%  { border-color: var(--drop-accent); box-shadow: 0 0 0 3px var(--drop-accent-faint); }
    100% { border-color: var(--drop-border); box-shadow: 0 0 0 0 transparent; }
}

/* ── @alt top banner (reasoning, responses, nudges) ──────── */

/* ── Placeholder spinner (carousel generating slide) ───── */
.drop-placeholder-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--drop-border);
    border-top-color: var(--drop-accent);
    border-radius: 50%;
    animation: drop-spin 0.8s linear infinite;
}

/* ── Bar chevron (stacks above bar in bottom zone) ──────── */
.drop-alt-bar-chevron {
    text-align: center;
    pointer-events: none;
}

.drop-alt-bar-chevron .material-icons {
    font-size: 48px;
    color: var(--drop-accent);
    animation: dropChevronBob 1.2s ease-in-out infinite;
}

@keyframes dropChevronBob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(8px); }
}
