/*
 * Drop Pro — the transfer app.
 *
 * Two screens, both narrow and centred: one file, one action, nothing
 * else competing for the eye. The recipient screen is a sales page as
 * much as a download page, so the sender's name sits above the fold and
 * the pitch sits below the fold, after they have what they came for.
 */

:root {
    --bg:       #0d1117;
    --panel:    #161b22;
    --panel-2:  #1c2230;
    --line:     #2a3140;
    --ink:      #e6edf3;
    --ink-dim:  #8b949e;
    --brand:    #58a6ff;
    --brand-ink:#06121f;
    --good:     #3fb950;
    --danger:   #f85149;
    --r:        12px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
    margin: 0; min-height: 100%;
    background: radial-gradient(900px 520px at 50% -8%, #172236 0%, var(--bg) 60%);
    color: var(--ink);
    font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
button, input, select { font: inherit; color: inherit; }

.dp { max-width: 620px; margin: 0 auto; padding: 22px 18px 56px; }
.dp__head { display: flex; align-items: center; gap: 9px; margin-bottom: 20px; }
.dp__mark { font-size: 22px; }
.dp__plan {
    margin-left: auto; font-size: 12px; padding: 3px 10px; border-radius: 999px;
    background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-dim);
}

.dp__card {
    background: var(--panel); border: 1px solid var(--line);
    border-radius: 16px; padding: 24px; margin-bottom: 16px;
}
.dp__card h1 { font-size: 25px; margin: 0 0 8px; text-wrap: balance; }
.dp__lede { color: var(--ink-dim); margin: 0 0 20px; }

/* the file picker */
.dp__drop {
    display: grid; justify-items: center; gap: 5px;
    padding: 34px 18px; cursor: pointer;
    border: 2px dashed var(--line); border-radius: var(--r);
    background: var(--panel-2); transition: border-color .15s, background .15s;
    text-align: center;
}
.dp__drop:hover, .dp__drop.is-over { border-color: var(--brand); background: #16243a; }
.dp__drop__icon { font-size: 26px; }
.dp__drop__main { font-weight: 600; }
.dp__drop__sub  { color: var(--ink-dim); font-size: 13px; overflow-wrap: anywhere; }

.dp__brandrow { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.dp__field { flex: 1 1 240px; min-width: 0; display: block; }
.dp__field--narrow { flex: 0 1 130px; }
.dp__field > span { display: block; font-size: 13px; color: var(--ink-dim); margin-bottom: 5px; }
.dp__field small  { display: block; font-size: 12px; color: var(--ink-dim); margin-top: 5px; }
.dp__field input, .dp__field select {
    width: 100%; padding: 10px 12px; background: var(--bg);
    border: 1px solid var(--line); border-radius: 9px; color: var(--ink);
}
.dp__field input:disabled { opacity: .5; }

/* the file in flight */
.dp__file { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; min-width: 0; }
.dp__file--big { padding: 14px; background: var(--panel-2); border-radius: var(--r); border: 1px solid var(--line); }
.dp__file__icon { font-size: 26px; }
.dp__file__meta { min-width: 0; display: grid; gap: 2px; }
.dp__file__meta strong { overflow-wrap: anywhere; }
.dp__file__meta span   { color: var(--ink-dim); font-size: 13px; overflow-wrap: anywhere; }

.dp__bar { height: 9px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.dp__bar__fill {
    height: 100%; width: 0;
    background: linear-gradient(90deg, var(--brand), #7ee2a8);
    transition: width .25s ease;
}
.dp__barmeta {
    display: flex; justify-content: space-between; gap: 10px;
    font-size: 13px; color: var(--ink-dim); margin-top: 7px; flex-wrap: wrap;
}
.dp__assure { color: var(--good); font-size: 13px; margin: 16px 0 0; }

.dp__link { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.dp__link input {
    flex: 1 1 220px; min-width: 0; padding: 10px 12px;
    background: var(--bg); border: 1px solid var(--line);
    border-radius: 9px; color: var(--ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px;
}
.dp__hint { color: var(--ink-dim); font-size: 13px; margin: 12px 0 0; }
.dp__err  { color: var(--danger); font-size: 13px; margin: 14px 0 0; }

.dp__btn {
    background: var(--panel-2); border: 1px solid var(--line); color: var(--ink);
    border-radius: 9px; padding: 10px 16px; cursor: pointer; text-decoration: none;
    display: inline-block; text-align: center;
}
.dp__btn:hover { background: #232b3a; }
.dp__btn:focus-visible, input:focus-visible, select:focus-visible,
.dp__drop:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.dp__btn--primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.dp__btn--primary:hover { background: #79b8ff; }
.dp__btn--primary:disabled { opacity: .55; cursor: default; }
.dp__btn--wide { width: 100%; padding: 14px; font-size: 16px; }
.dp__btn--save { background: var(--good); border-color: var(--good); color: #06210f; font-weight: 700; width: 100%; padding: 14px; }
.dp__btn--ghost { background: none; }

/* the recipient page */
.dp--receive { padding-top: 42px; }
.dp__card--recv { padding: 28px; }
.dp__from { text-align: center; margin-bottom: 20px; }
.dp__from strong {
    display: block; font-size: 21px; margin-bottom: 3px;
    overflow-wrap: anywhere;   /* a sender name is somebody else's string */
}
.dp__from span { color: var(--ink-dim); }
.dp__verified { color: var(--good); font-size: 13px; text-align: center; margin: 12px 0 0; }

.dp__pitch {
    margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line);
    display: flex; gap: 12px; align-items: center; justify-content: space-between;
    flex-wrap: wrap;
}
.dp__pitch span { color: var(--ink-dim); font-size: 14px; flex: 1 1 200px; }

.dp__toast {
    position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
    background: var(--panel-2); border: 1px solid var(--line);
    border-radius: var(--r); padding: 10px 16px;
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

@media (max-width: 480px) {
    .dp { padding: 16px 12px 40px; }
    .dp__card { padding: 18px; }
    .dp__card h1 { font-size: 22px; }
    .dp__field--narrow { flex: 1 1 100%; }
}

/* Several files or a folder go as one ZIP; the folder picker sits under the
   drop zone, which already takes several files. */
.dp__folder { display: inline-flex; justify-self: center; margin: 10px auto 0; cursor: pointer; }
