/*!
 * Nabd — internet speed test (speed.doniaweb.com)
 * Copyright (c) 2026 Mahmoud Ali — doniaweb.com. All rights reserved.
 * Created: 2026-10-13
 */
/* Donations: header button, card under the result, quick sheet, /support page. */
.don-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 12px; font-size: .88rem; font-weight: 600; text-decoration: none;
  color: #fb7185; background: color-mix(in srgb, #f43f5e 12%, var(--card)); border: 1px solid color-mix(in srgb, #f43f5e 35%, var(--line)); }
.don-btn:hover { background: color-mix(in srgb, #f43f5e 20%, var(--card)); }
.don-btn[hidden] { display: none; }
@media (max-width: 520px) { .don-btn { padding: 0 10px; } .don-btn span + span { display: none; } }

.don-card { display: flex; flex-direction: column; gap: 10px; border-color: color-mix(in srgb, var(--c2) 45%, var(--line));
  background: linear-gradient(160deg, color-mix(in srgb, var(--c1) 10%, var(--card)), color-mix(in srgb, var(--c2) 12%, var(--card))); }
.don-card[hidden] { display: none; }
.don-card-t { font-size: 1.05rem; }
.don-card .don-card-hide { align-self: center; background: none; border: 0; color: var(--muted); font: inherit; font-size: .82rem; cursor: pointer; }

.don-seg { display: flex; background: var(--track); border-radius: 12px; padding: 4px; margin-bottom: 12px; }
.don-seg button { flex: 1; border: 0; background: none; color: var(--muted); font: inherit; font-size: .9rem; padding: 8px; border-radius: 9px; cursor: pointer; }
.don-seg button.on { background: var(--card-solid, var(--card)); color: var(--text); font-weight: 600; }
.don-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; }
.don-chip { padding: 10px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; }
.don-chip.on { border-color: var(--c1); background: color-mix(in srgb, var(--c1) 14%, var(--card)); color: var(--c1); }
.don-custom { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.don-custom input { flex: 1; }
.don-custom span { color: var(--muted); font-weight: 600; }
.don-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.don-fields .wide { grid-column: 1 / -1; }
.don-label { margin: 16px 0 8px; font-weight: 600; font-size: .92rem; }
.don-methods { display: flex; flex-direction: column; gap: 8px; }
.don-methods .btn { justify-content: center; width: 100%; }
.don-manual { margin-top: 12px; padding: 14px; border-radius: 14px; border: 1px dashed var(--line); display: flex; flex-direction: column; gap: 10px; line-height: 1.7; }
.don-manual[hidden] { display: none; }
.don-target { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.don-acc { font-size: 1.15rem; letter-spacing: .5px; user-select: all; }
.don-msg { margin-top: 10px; font-size: .9rem; }
.don-msg.bad { color: var(--bad); }
.don-msg[hidden] { display: none; }
.don-ok { color: var(--ok); font-weight: 600; }
.don-secure { margin-top: 12px; text-align: center; }

.don-sheet { position: fixed; inset: 0; z-index: 90; background: rgba(3, 6, 15, .6); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; }
.don-sheet[hidden] { display: none; }
.don-sheet-box { position: relative; width: min(460px, 100%); max-height: 90vh; overflow: auto; }
.don-sheet-box h3 { margin-bottom: 4px; padding-inline-end: 40px; }
.don-sheet-box > div > p { margin-bottom: 14px; }
.don-x { position: absolute; top: 12px; inset-inline-end: 12px; width: 34px; height: 34px; }
.don-grab { display: none; }
.don-more { display: block; text-align: center; margin-top: 12px; font-size: .88rem; }
@media (max-width: 600px) {
  .don-sheet { align-items: end; padding: 0; }
  .don-sheet-box { width: 100%; max-height: 88vh; border-radius: 24px 24px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .don-grab { display: block; width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: -4px auto 12px; }
  .don-fields { grid-template-columns: 1fr; }
}

.don-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 30px; }
.don-side { display: flex; flex-direction: column; gap: 18px; }
.don-goal-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.don-bar { height: 10px; border-radius: 99px; background: var(--track); overflow: hidden; margin: 10px 0 6px; }
.don-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--c1), var(--c2)); }
[dir=rtl] .don-bar i { margin-inline-start: 0; }
.don-donors h3 { margin-bottom: 8px; }
.don-donor { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.don-donor:last-child { border-bottom: 0; }
.don-note { margin-bottom: 18px; font-weight: 600; }
.don-note.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.don-note.bad { color: var(--bad); }
@media (max-width: 860px) { .don-grid { grid-template-columns: 1fr; } }

/* Card after a result: brighter, so it reads as an invitation rather than a note. */
.don-card {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c1) 26%, var(--card)), color-mix(in srgb, var(--c2) 32%, var(--card)));
  border: 1.5px solid color-mix(in srgb, var(--c2) 60%, transparent);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--c2) 22%, transparent);
}
.don-card::before { content: "❤"; position: absolute; inset-inline-end: -6px; top: -18px; font-size: 7rem; line-height: 1; color: color-mix(in srgb, var(--c2) 22%, transparent); pointer-events: none; }
.don-card > * { position: relative; }
.don-card-t { font-size: 1.15rem; }
.don-card p.muted { color: var(--text); opacity: .85; }
.don-card .don-chip { background: color-mix(in srgb, var(--card) 85%, transparent); border-color: color-mix(in srgb, var(--c2) 35%, var(--line)); }
.don-card .don-chip:hover { border-color: var(--c1); color: var(--c1); }
.don-card .don-card-go { box-shadow: 0 8px 20px color-mix(in srgb, var(--c2) 35%, transparent); }

/* Header button: same size and frame as the other header buttons, a drawn heart; the label shows on wide screens. */
.don-btn { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: #f43f5e; }
.don-btn svg { width: 19px; height: 19px; fill: currentColor; flex: none; }
.don-btn span { display: none; }
.don-btn:hover { background: color-mix(in srgb, #f43f5e 10%, var(--card)); border-color: color-mix(in srgb, #f43f5e 45%, var(--line)); }
@media (min-width: 1000px) { .don-btn { width: auto; padding: 0 14px; gap: 7px; } .don-btn span { display: inline; color: var(--text); font-weight: 600; } }
/* Close button of the quick sheet */
.don-x { position: absolute; top: 12px; inset-inline-end: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: var(--track); color: var(--muted); transition: background .2s, color .2s; }
.don-x:hover { background: color-mix(in srgb, var(--text) 14%, transparent); color: var(--text); }
.don-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
