/* Report a vulnerability form (/security/report-vulnerability/).
   Loaded after bug-bounty.css, whose .bb-sec, .bb-wrap, .bb-title, .bb-lead and --bb-card-bg this page reuses
   (the same Onyx opening as the program page). Form fields come from base.css (.js-form, .js-form__field,
   .js-form__label, .js-form__input, .js-form__select, .js-form__textarea, .button).
   Page-only: the narrow column, the white form card, the two-column grid, the select caret, the file input,
   the status messages and the submit spinner. Every colour comes from tokens. */

.rv-wrap { max-width: 880px; }

/* Hero: shorter than the program page, the form is the point */
.rv-hero { padding: 168px 0 64px; }
.rv-lead { max-width: 60ch; }
.rv-lead a { font-weight: 600; color: var(--color-main); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--color-main-op3); }
.rv-lead a:hover { text-decoration-color: var(--color-main); }

.rv-form-sec { padding: 72px 0 104px; }

/* Form card */
.rv-form { padding: 40px; border: 1px solid var(--color-border); border-radius: var(--js-radius-lg); background: var(--bb-card-bg); }
.rv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(var(--js-padding) * 1.75) 24px; }
/* Form title: a card heading, so js-cards__title (30px) and not the section title; base.css sets the type */
.rv-title { margin: 0; text-wrap: balance; font-size: calc(var(--font-base-size) * 2);}
.js-form__label small { color: var(--color-secondary-op7); }

/* Select: native control with a drawn caret */
.rv-select { position: relative; }
.rv-select .js-form__select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; }
.rv-select > i { position: absolute; top: 50%; right: 16px; transform: translateY(-50%); pointer-events: none; color: var(--color-main); }

/* A field the browser rejected after the first submit attempt: the native bubble names the problem,
   this makes the field itself easy to find. :user-invalid only matches once the user has interacted or submitted. */
.rv-form :is(.js-form__input, .js-form__select, .js-form__textarea):user-invalid { border-color: var(--js-tag-danger-ink); }
.rv-form :is(.js-form__input, .js-form__select, .js-form__textarea):user-invalid:focus { border-color: var(--js-tag-danger-ink); }

/* Textareas keep a comfortable minimum and only grow vertically */
.rv-form .js-form__textarea { resize: vertical; line-height: 1.5; }

/* File input */
.rv-file { padding: 10px; cursor: pointer; }
.rv-file::file-selector-button { margin-right: 14px; padding: 8px 14px; border: 0; border-radius: var(--js-radius-sm); background: var(--color-main-op1); color: var(--color-main); font-family: var(--font-button); font-weight: 600; font-size: 14px; cursor: pointer; transition: var(--js-transition); }
.rv-file:hover::file-selector-button { background: var(--color-main-op2); }
.rv-hint { margin: 0; font-size: 14px; line-height: 1.4; color: var(--color-secondary-op7); }

.rv-form .button:disabled { opacity: .6; cursor: not-allowed; }
.rv-note { margin: 24px 0 0; text-align: center; font-size: 14px; line-height: 1.5; color: var(--color-secondary-op7); }
.rv-note a { font-weight: 600; color: var(--color-main); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--color-main-op3); }
.rv-note a:hover { text-decoration-color: var(--color-main); }

/* Status messages written by the inline script */
.rv-alert { margin-bottom: 24px; padding: 16px 20px; border: 1px solid transparent; border-radius: var(--js-radius-md); font-size: 16px; line-height: 1.5; }
.rv-alert--ok { background: var(--js-color-green-tint); border-color: var(--js-color-green-glow); color: var(--color-main); }
.rv-alert--error { background: var(--js-tag-danger-bg); color: var(--js-tag-danger-ink); }

/* Submit spinner (the arrow icon swaps to a notch while the request is in flight) */
.rv-spin { animation: rv-spin 1s linear infinite; }
@keyframes rv-spin { to { transform: rotate(360deg); } }

@media (max-width: 991px) {
  .rv-hero { padding-top: 140px; }
}

@media (max-width: 720px) {
  .rv-hero { padding: 112px 0 40px; }
  .rv-form-sec { padding: 40px 0 72px; }
  .rv-form { padding: 24px; }
  .rv-grid { grid-template-columns: minmax(0, 1fr); }
}
