/* ===== Mobile Sponsor Apply Bottom-Sheet Modal ===== */

/* Desktop: hidden entirely */
@media (min-width: 1025px) {
  .sam { display: none !important; }
}

/* ── Mobile + Tablet ≤1024px ───────────────────────────────────────── */
@media (max-width: 1024px) {

  /* Backdrop */
  .sam {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10005;
    background: rgba(10, 14, 26, 0.85);
    align-items: flex-end;
    justify-content: center;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }
  .sam.open {
    display: flex;
  }

  /* Sheet */
  .sam__sheet {
    position: relative;
    width: 100%;
    max-height: 92vh;
    background: var(--bg-card, #14172b);
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    animation: samSlideUp 0.3s ease-out;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4);
  }
  @keyframes samSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
  }

  /* Handle */
  .sam__handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 4px;
    margin: 10px auto 0;
    flex-shrink: 0;
  }

  /* Header */
  .sam__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem 0.5rem;
    flex-shrink: 0;
  }
  .sam__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary, #fff);
  }
  .sam__brand img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }
  .sam__close {
    all: unset;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s;
  }
  .sam__close:active {
    background: rgba(255, 255, 255, 0.1);
  }
  .sam__close svg {
    stroke: rgba(255, 255, 255, 0.55);
  }

  /* Body (scrollable) */
  .sam__body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1rem 1.25rem;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 1.25rem));
    -webkit-overflow-scrolling: touch;
  }

  /* Title / Subtitle */
  .sam__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary, #fff);
    margin: 0 0 0.25rem;
  }
  .sam__title i {
    color: var(--primary, #8b5cf6);
  }
  .sam__subtitle {
    font-size: 0.85rem;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    margin: 0 0 1rem;
    line-height: 1.4;
  }

  /* States */
  .sam__state.hidden {
    display: none;
  }

  /* Info cards (blocked / already sponsor) */
  .sam__info-card {
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
  }
  .sam__info-card h3 {
    margin: 0.5rem 0;
    color: inherit;
    font-size: 1.05rem;
  }
  .sam__info-card p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
  }
  .sam__info-card--error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
  }
  .sam__info-card--success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
  }

  /* Status card, badges, and comment blocks → .ss-* in base.css */

  /* Forms */
  .sam__form {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .sam__form.hidden {
    display: none;
  }
  .sam__form .form-group {
    margin-bottom: 0.85rem;
  }
  .sam__form .form-label {
    font-size: 0.82rem;
    margin-bottom: 0.3rem;
  }
  .sam__form .form-input {
    font-size: 1rem;
    padding: 0.7rem 0.85rem;
  }
  .sam__submit {
    margin-top: 0.25rem;
    width: 100%;
  }

  /* Alerts */
  .sam .login-alert {
    margin-top: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    font-size: 0.82rem;
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
  }
  .sam .login-alert.hidden {
    display: none;
  }
  .sam .login-alert.login-success {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.2);
  }

  /* Footer */
  .sam__footer {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    text-align: center;
  }
  .sam__footer a {
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    text-decoration: none;
    font-size: 0.85rem;
  }
  .sam__footer a:active {
    color: #a78bfa;
  }

  /* ── Light theme overrides ────────────────────────────────────────── */
  [data-theme="light"] .sam {
    background: rgba(0, 0, 0, 0.45);
  }
  [data-theme="light"] .sam__sheet {
    background: var(--bg-card, #fff);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
  }
  [data-theme="light"] .sam__handle {
    background: rgba(0, 0, 0, 0.15);
  }
  [data-theme="light"] .sam__close svg {
    stroke: rgba(0, 0, 0, 0.45);
  }
  [data-theme="light"] .sam__footer {
    border-top-color: rgba(0, 0, 0, 0.07);
  }
  [data-theme="light"] .sam .login-alert {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.15);
  }
  [data-theme="light"] .sam .login-alert.login-success {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.15);
  }

} /* end @media (max-width: 1024px) */
