/* modules/roundupdonation/views/css/roundupdonation.css */
:root{
  --rdn-accent:#ff8a3d;
  --rdn-accent-ink:#b35406;
  --rdn-accent-weak:#fff7ef;
  --rdn-border:#ffd9b3;
  --rdn-text:#222;
  --rdn-text-dim:#495057;
  --rdn-muted:#6c757d;
}
.rdn-card{
  border:1px solid var(--rdn-border);
  border-radius:16px;
  padding:14px 16px;
  margin:.75rem 0 1rem;
  background:linear-gradient(180deg, var(--rdn-accent-weak), #fff);
  box-shadow:0 6px 24px rgba(0,0,0,.04);
  display:grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items:center;
  column-gap:12px;
}
.rdn-switch{
  grid-column:1; grid-row:1;
  display:grid;
  grid-template-columns:auto 1fr;
  grid-column-gap:.85rem;
  align-items:center;
  cursor:pointer;
  user-select:none;
  touch-action:manipulation;
}
.rdn-switch__input{ position:absolute; opacity:0; width:1px; height:1px; overflow:hidden; }
.rdn-switch__slider{
  display:inline-block; width:50px; height:30px; border-radius:30px;
  background:rgba(0,0,0,.18);
  position:relative; transition:all .18s ease;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}
.rdn-switch__slider::after{
  content:""; position:absolute; top:4px; left:4px;
  width:22px; height:22px; border-radius:22px;
  background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.2);
  transition:transform .18s ease;
}
.rdn-switch__input:checked + .rdn-switch__slider{
  background:var(--rdn-accent);
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.06), 0 6px 14px rgba(255,138,61,.28);
}
.rdn-switch__input:checked + .rdn-switch__slider::after{ transform:translateX(20px); }
.rdn-switch__label{
  font-size:16px; line-height:1.35; color:var(--rdn-text-dim);
  word-break:normal; white-space:normal; text-align:left;
}
.rdn-switch__input:checked ~ .rdn-switch__label{ color:var(--rdn-text); }
.rdn-switch__label .rdn-amount{ color:var(--rdn-accent-ink); font-weight:600; }
.rdn-switch__label .rdn-assoc{ color:inherit; font-weight:inherit; }

.rdn-logo{
  grid-column:2; grid-row:1 / span 2;
  height:100%; width:auto; max-height:60px; max-width:220px; object-fit:contain; margin-left:auto; display:block;
}
.rdn-hint{ grid-column:1; grid-row:2; font-size:13px; color:var(--rdn-muted); }

/* Focus */
.rdn-switch__input:focus + .rdn-switch__slider{ outline:2px solid var(--rdn-accent); outline-offset:2px; }

/* Mobile */
@media (max-width: 480px){
  .rdn-card{
    padding:12px; border-radius:14px;
    grid-template-columns: 1fr auto; /* keep two columns but restrict logo */
  }
  .rdn-switch__label{ font-size:15px; }
  .rdn-switch__slider{ width:46px; height:26px; }
  .rdn-switch__slider::after{ width:18px; height:18px; top:4px; left:4px; }
  .rdn-switch__input:checked + .rdn-switch__slider::after{ transform:translateX(20px); }

  /* Key changes: logo no longer stretches card height; cap at 60px and center vertically */
  .rdn-logo{
    grid-row:1; align-self:center; height:auto; max-width:120px;
  }
  .rdn-hint{ margin-top:4px; }
}

/* 1.1.28: save in progress and failed save. */
.rdn-card--busy { cursor: progress; }
.rdn-card--busy .rdn-switch { opacity: .6; }
.rdn-error { grid-column: 1 / -1; margin: 8px 0 0; color: #b42318; font-size: 13px; line-height: 1.4; }
.rdn-status { grid-column: 1 / -1; margin: 8px 0 0; font-size: 13px; line-height: 1.4; }
