/* Voicemail recorder: /voicemail and the widget. Colours from the BSJ site: red #c50122, yellow #fbe347. */
.vm {
    --vm-red: #c50122;
    --vm-red-dark: #9e0119;
    --vm-red-tint: #fdecee;
    --vm-ink: #1f1f1f;
    --vm-muted: #5c5c57;
    --vm-line: #dedcd3;
    --vm-paper: #ffffff;
    --vm-soft: #f6f5f1;
    --vm-yellow: #fbe347;
    font-family: 'Poppins', system-ui, sans-serif;
    color: var(--vm-ink);
    background: var(--vm-paper);
    padding: 28px;
    line-height: 1.5;
    text-align: left;
}
.vm *, .vm *::before, .vm *::after { box-sizing: border-box; }
.vm svg { display: block; }
.vm [hidden] { display: none !important; }
.vm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
.vm :focus-visible { outline: 3px solid var(--vm-red); outline-offset: 3px; }

/* Heading */
.vm-head { display: flex; gap: 16px; align-items: center; padding-bottom: 20px; border-bottom: 1px solid var(--vm-line); }
.vm-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: 60% 25%; flex: none; background: var(--vm-soft); border: 3px solid var(--vm-yellow); }
.vm-title { font-family: 'Lilita One', 'Poppins', sans-serif; font-weight: 400; font-size: 1.7rem; line-height: 1.15; margin: 0 0 4px; color: var(--vm-red); }
.vm-sub { margin: 0; color: var(--vm-muted); font-size: 0.95rem; }
.vm-close { margin-left: auto; align-self: flex-start; flex: none; width: 44px; height: 44px; border: 0; background: transparent; border-radius: 50%; cursor: pointer; color: var(--vm-muted); display: grid; place-items: center; }
.vm-close:hover { background: var(--vm-soft); color: var(--vm-ink); }
.vm-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* Steps */
.vm-step { padding-top: 24px; }
.vm-stage { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 0 4px; }

/* Start */
.vm-mic {
    width: 112px; height: 112px; border-radius: 50%; border: 0; cursor: pointer;
    background: var(--vm-red); color: #fff; display: grid; place-items: center;
    box-shadow: 0 0 0 10px var(--vm-red-tint), 0 10px 24px rgba(197, 1, 34, 0.35);
    transition: transform 0.15s ease, background-color 0.15s ease;
}
.vm-mic:hover { background: var(--vm-red-dark); transform: scale(1.04); }
.vm-mic:active { transform: scale(0.97); }
.vm-mic[disabled] { opacity: 0.6; cursor: progress; transform: none; }
.vm-mic svg { width: 46px; height: 46px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.vm-mic svg rect { fill: currentColor; }
.vm-cta { margin: 22px 0 0; font-weight: 600; font-size: 1.05rem; }
.vm-tip {
    display: flex; gap: 10px; align-items: center; justify-content: center;
    margin: 22px auto 0; padding: 10px 16px; max-width: 30rem;
    background: #fff9d6; color: #4a3f00; font-weight: 600; font-size: 0.95rem;
}
.vm-tip svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.vm-fine { margin: 14px 0 0; text-align: center; font-size: 0.82rem; color: var(--vm-muted); }

/* Recording */
.vm-dial { position: relative; width: 148px; height: 148px; display: grid; place-items: center; }
.vm-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.vm-ring circle { fill: none; stroke-width: 6; }
.vm-ring-track { stroke: var(--vm-line); }
.vm-ring-fill { stroke: var(--vm-red); stroke-linecap: round; transition: stroke 0.3s; }
.vm-long .vm-ring-fill { stroke: #d98200; }
.vm-stop {
    width: 104px; height: 104px; border-radius: 50%; border: 0; cursor: pointer; position: relative;
    background: var(--vm-ink); color: #fff; display: grid; place-items: center;
}
.vm-stop:hover { background: #000; }
.vm-stop svg { width: 34px; height: 34px; fill: currentColor; }
.vm-stop::before {
    content: ''; position: absolute; inset: -2px; border-radius: 50%;
    border: 2px solid var(--vm-red); animation: vm-pulse 1.6s ease-out infinite;
}
@keyframes vm-pulse { from { transform: scale(1); opacity: 0.9; } to { transform: scale(1.35); opacity: 0; } }
.vm-clock { margin: 18px 0 0; font-size: 2rem; font-weight: 600; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 10px; }
.vm-clock-max { color: var(--vm-muted); font-size: 1rem; font-weight: 400; }
.vm-rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--vm-red); animation: vm-blink 1s steps(2, start) infinite; }
@keyframes vm-blink { to { visibility: hidden; } }
.vm-meter { width: 100%; max-width: 320px; height: 44px; margin-top: 10px; color: var(--vm-red); }
.vm-hint { margin: 8px 0 0; font-weight: 600; color: var(--vm-muted); min-height: 1.5em; }
.vm-long .vm-hint { color: #8a5300; }

/* Working */
.vm-working { padding: 48px 0; color: var(--vm-muted); }
.vm-spinner { width: 40px; height: 40px; border-radius: 50%; border: 4px solid var(--vm-line); border-top-color: var(--vm-red); animation: vm-spin 0.8s linear infinite; margin-bottom: 12px; }
@keyframes vm-spin { to { transform: rotate(360deg); } }

/* Review: player */
.vm-player { display: flex; align-items: center; gap: 14px; background: var(--vm-soft); border: 1px solid var(--vm-line); padding: 12px 16px 12px 12px; }
.vm-play { width: 52px; height: 52px; flex: none; border-radius: 50%; border: 0; cursor: pointer; background: var(--vm-red); color: #fff; display: grid; place-items: center; }
.vm-play:hover { background: var(--vm-red-dark); }
.vm-play svg { width: 24px; height: 24px; fill: currentColor; }
.vm-play .i-pause, .vm-play.playing .i-play { display: none; }
.vm-play.playing .i-pause { display: block; }
.vm-track { flex: 1; min-width: 0; }
.vm-track input[type=range] {
    --fill: 0%;
    -webkit-appearance: none; appearance: none; width: 100%; height: 24px; background: transparent; margin: 0; cursor: pointer;
}
.vm-track input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--vm-red) var(--fill), var(--vm-line) var(--fill)); }
.vm-track input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--vm-line); }
.vm-track input[type=range]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--vm-red); }
.vm-track input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--vm-red); margin-top: -5px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--vm-red); }
.vm-track input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--vm-red); border: 2px solid #fff; }
.vm-times { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--vm-muted); font-variant-numeric: tabular-nums; }

.vm-link {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; min-height: 44px; padding: 6px 4px;
    background: none; border: 0; cursor: pointer; font: inherit; font-weight: 600; color: var(--vm-red);
}
.vm-link:hover { color: var(--vm-red-dark); text-decoration: underline; }
.vm-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Review: form */
.vm-form { margin-top: 12px; padding-top: 18px; border-top: 1px solid var(--vm-line); }
.vm-field { margin-bottom: 16px; }
.vm-field label { display: block; font-weight: 600; margin-bottom: 6px; }
.vm-field input {
    width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; font-size: 16px; color: var(--vm-ink);
    background: #fff; border: 1px solid #8d8b82; border-radius: 0;
}
.vm-field input:focus { border-color: var(--vm-ink); outline: 3px solid var(--vm-yellow); outline-offset: 0; }
.vm-field input[aria-invalid=true] { border: 2px solid var(--vm-red); }
.vm-field-error { margin: 6px 0 0; color: var(--vm-red-dark); font-weight: 600; font-size: 0.9rem; }
.vm-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.vm-error { margin: 14px 0 0; padding: 10px 14px; background: var(--vm-red-tint); border-left: 4px solid var(--vm-red); color: var(--vm-red-dark); font-weight: 600; font-size: 0.92rem; text-align: left; }
.vm-form .vm-error { margin: 0 0 14px; }
.vm-progress { display: block; width: 100%; height: 6px; margin-bottom: 14px; accent-color: var(--vm-red); }
.vm-send {
    width: 100%; min-height: 54px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    background: var(--vm-red); color: #fff; border: 0; border-radius: 0; cursor: pointer;
    font: inherit; font-weight: 600; font-size: 1.05rem;
}
.vm-send:hover { background: var(--vm-red-dark); }
.vm-send[disabled] { opacity: 0.6; cursor: progress; }
.vm-send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Sent */
.vm-done { padding: 12px 0; }
.vm-check { width: 76px; height: 76px; border-radius: 50%; background: #1b6b3a; color: #fff; display: grid; place-items: center; margin-bottom: 16px; box-shadow: 0 0 0 10px #e6f4ea; }
.vm-check svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.vm-done h3 { font-family: 'Lilita One', 'Poppins', sans-serif; font-weight: 400; font-size: 1.7rem; margin: 0 0 6px; color: var(--vm-ink); }
.vm-done h3:focus { outline: none; }
.vm-done p { margin: 0; color: var(--vm-muted); max-width: 26rem; }

@media (max-width: 480px) {
    .vm { padding: 20px 16px; }
    .vm-head { gap: 12px; }
    .vm-avatar { width: 52px; height: 52px; }
    .vm-title { font-size: 1.4rem; }
    .vm-sub { font-size: 0.88rem; }
}
@media (prefers-reduced-motion: reduce) {
    .vm-stop::before, .vm-rec-dot, .vm-spinner { animation: none; }
    .vm-mic { transition: none; }
}

/* The /voicemail page around the recorder */
.vm-hero { color: #fff; text-align: center; padding: 72px 0 132px; }
.vm-hero h1 { font-family: 'Lilita One', cursive; font-size: clamp(2.4rem, 7vw, 4.6rem); color: #fbe347; margin: 0 0 8px; line-height: 1.05; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35); }
.vm-hero p { font-size: clamp(1rem, 2.4vw, 1.25rem); margin: 0 auto; max-width: 36rem; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5); }
.vm-page-body { padding: 0 16px 56px; }
.vm-card { max-width: 560px; margin: -96px auto 0; position: relative; box-shadow: 0 18px 50px rgba(20, 20, 40, 0.18); border-top: 5px solid #c50122; }
.vm-how { list-style: none; padding: 0; margin: 36px auto 0; max-width: 860px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.vm-how li { display: flex; gap: 12px; align-items: flex-start; color: #5c5c57; font-size: 0.95rem; }
.vm-how b { flex: none; width: 32px; height: 32px; border-radius: 50%; background: #1f1f1f; color: #fbe347; display: grid; place-items: center; font-family: 'Lilita One', cursive; font-weight: 400; font-size: 1.05rem; }
.vm-how strong { display: block; color: #1f1f1f; }
@media (max-width: 720px) {
    .vm-hero { padding: 44px 0 108px; }
    .vm-how { grid-template-columns: 1fr; gap: 16px; max-width: 560px; }
}
