/* EDSD Donation Plugin - Tricolor theme */
.edsd-lookup-wrap{
  max-width:540px;
  margin:18px auto;
  border-radius:12px;
  padding:18px;
  box-shadow:0 8px 22px rgba(0,0,0,0.09);
  background:linear-gradient(90deg,#FF9933 0%, #FFFFFF 50%, #138808 100%);
  background-size:300% 100%;
  animation:edsd-gradient 8s linear infinite;
  color:#07223a;
  font-family:system-ui,Segoe UI,Roboto,Arial;
}
@keyframes edsd-gradient {
  0%{background-position:0% 50%}
  50%{background-position:100% 50%}
  100%{background-position:0% 50%}
}
.edsd-header{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.edsd-logo{font-weight:800;padding:8px;border-radius:8px;background:rgba(255,255,255,0.85);box-shadow:0 2px 6px rgba(0,0,0,0.06)}
.edsd-trust{font-weight:700}
.edsd-lookup-form input{width:100%;padding:10px;margin:6px 0;border-radius:8px;border:1px solid rgba(0,0,0,0.12)}
.edsd-lookup-form button{padding:10px 14px;border-radius:8px;border:none;cursor:pointer;font-weight:600;background:rgba(7,36,58,0.9);color:#fff}
.edsd-result, .edsd-error{margin-top:12px;padding:10px;border-radius:8px;background:rgba(255,255,255,0.9)}
.edsd-error{background:rgba(255,255,255,0.75);border-left:4px solid #d9534f}
.edsd-result h3{margin-top:0}
.edsd-wrap .form-table input{width:100%}
@media (max-width:600px){
  .edsd-lookup-wrap{margin:12px;padding:14px}
  .edsd-trust{font-size:14px}
}

/* --- EDSD: responsive table on desktop, cards on small screens --- */

/* Table styling for desktop */
.edsd-donations-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.04);
}
.edsd-donations-table thead th {
  text-align: left;
  padding: 10px 12px;
  white-space: nowrap; /* prevent header wrapping */
  font-weight:700;
  border-bottom:1px solid #eee;
  color:#07223a;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.9));
}
.edsd-donations-table tbody td {
  padding: 10px 12px;
  vertical-align: middle;
  white-space: nowrap; /* prevent cell wrapping */
  border-bottom:1px solid #f6f6f6;
  color:#333;
}
.edsd-donations-table tbody tr:last-child td {
  border-bottom: none;
}

/* Small screens: hide table header, show cards */
@media (max-width: 820px) {
  .edsd-donations-table { display: none; } /* hide table on mobile */
  .edsd-cards-list { display:block; gap:12px; margin-top:8px; }
}

/* Desktop & larger: hide cards (we'll still render them but hide) */
@media (min-width: 821px) {
  .edsd-cards-list { display: none; }
}

/* Card styles for mobile */
.edsd-card {
  background:#fff;
  border-radius:8px;
  padding:12px;
  box-shadow:0 4px 12px rgba(0,0,0,0.06);
  border-left:6px solid rgba(7,36,58,0.12);
}
.edsd-card .edsd-row { display:flex; justify-content:space-between; gap:8px; margin-bottom:6px; font-size:14px; align-items:center; }
.edsd-card .edsd-row .label { color:#666; font-weight:600; width:40%; }
.edsd-card .edsd-row .value { color:#07223a; width:60%; word-break:break-word; text-align:right; }

/* ensure long values don't overflow */
.edsd-donations-table td, .edsd-donations-table th, .edsd-card { overflow-wrap: anywhere; }

/* Small visual polish for action links */
.edsd-donations-table a,
.edsd-card a {
  color: #06466f;
  text-decoration: none;
}
.edsd-donations-table a:hover,
.edsd-card a:hover {
  text-decoration: underline;
}

/* Tricolor accent lines for header (subtle) */
.edsd-lookup-wrap::before {
  content: "";
  display: block;
  height: 6px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(90deg, #FF9933 0%, #FFFFFF 50%, #138808 100%);
  margin: -18px -18px 12px -18px;
}

/* Admin notices spacing */
.edsd-wrap .notice { margin-top:12px; }

/* Small devices tweak for form fields in admin */
@media (max-width:600px){
  .edsd-wrap .form-table td { display:block; width:100%; }
  .edsd-wrap .form-table th { display:block; width:100%; margin-bottom:6px; color:#333; font-weight:600; }
}