/* styles.css – Riftbound Eco Proxy Cleaned */

/* ── Reset & Base ────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html, body {
  width: 100%;
  height: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f4f4f4;
  color: #333;
}

/* ── Top-Bar Buttons ─────────────────────────────────────────────────────── */
.topbar-btn {
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  margin-left: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.topbar-btn:hover {
  background: #0056b3;
}

/* Full-Proxy Button Active State */
#btn-full-proxy.active {
  background: #ffc107;
  border-color: #e0a800;
  color: #000;
}
#btn-full-proxy.active:hover {
  background: #e0a800;
}

/* Primary variant for Import/OK buttons */
.topbar-btn.primary {
  background: #28a745;
  border-color: #218838;
  color: #fff;
}
.topbar-btn.primary:hover {
  background: #218838;
}

/* ── Card Counter ───────────────────────────────────────────────────────── */
#card-count {
  margin-left: 16px;
  font-weight: bold;
}

/* ── Hidden Utility ─────────────────────────────────────────────────────── */
.hidden {
  display: none !important;
}

/* ── Modal Overlay ─────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  top: 50px;                /* below 50px top bar */
  left: 0;
  width: 100%;
  height: calc(100% - 50px);
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: start;
  overflow-y: auto;
  padding: 20px 0;
  z-index: 2000;
}

/* ── Modal Content Box ─────────────────────────────────────────────────── */
.modal-content {
  position: relative;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 90%;
  max-width: 600px;
  padding: 16px;
}

/* ── Modal Close Button ────────────────────────────────────────────────── */
.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
}

/* ── Import Modal Specific ─────────────────────────────────────────────── */
.import-content {
  max-width: 500px;
  text-align: left;
}
.import-instructions {
  margin: 0.5em 0;
  font-style: italic;
  color: #555;
}
#import-area {
  width: 100%;
  height: 120px;
  font-family: monospace;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px;
  margin-bottom: 0.75em;
  resize: vertical;
}
.import-clear {
  display: flex;
  align-items: center;
  margin-bottom: 1em;
  font-size: 0.9rem;
}
.import-clear input {
  margin-right: 0.5em;
}
.import-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5em;
  margin-top: 1em;
}

/* Search Modal Base */
#search-modal {
  position: fixed !important;
  top: 50px !important;
  left: 0;
  width: 100%;
  height: calc(100% - 50px);
  background: rgba(0, 0, 0, 0.4);
  overflow-y: auto;
  z-index: 2000;
}

/* Search Header */
#search-modal .search-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 16px;
  background: #fff;
  border-bottom: 1px solid #ddd;
  z-index: 2001;
  justify-content: center;
}
#search-modal .modal-content {
  width: 100% !important;
  max-width: none !important;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  padding: 0;
}

/* Search Input */
#search-modal .search-header input {
  flex: 1;
  height: 48px;
  padding: 12px 16px;
  border: 1px solid #ccc;
  border-radius: 24px;
  font-size: 1rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 80% !important;
  max-width: 800px;
  margin: 0 auto;
  display: block;
  box-sizing: border-box;
}
#search-modal .search-header input:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

/* Search Panel & Results */
#search-modal .results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 16px;
  margin-top: 8px;
}
/* ── Donate Button Icons ───────────────────────────────────────────────── */
.donate-buttons {
  display: inline-flex;
  gap: 12px;
  align-items: center;
}
.donate-buttons img {
  display: block;
  cursor: pointer;
}

@media print {
  /* ── Container tweaks ───────────────────────────────────────────── */
  #container.print-layout {
    /* remove the 101% width hack */
    transform: scale(0.99);
    transform-origin: top left;
    width: 100% !important;    /* fill the printable area */
    margin: 0 !important;
    padding: 0 !important;
  }

  /* ── Centered multi-column grid ─────────────────────────────────── */
  body {
padding-top: 0px !important;
  }
  #card-container.layout-horizontal {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, 63mm) !important;
    grid-auto-rows: 88mm !important;
    gap: 0 !important;

    /* Center the whole grid block horizontally */
    justify-content: center !important;

    /* If you want vertical centering of the grid block within the page: */
    align-content: start !important; /* or 'center' if you have height constraints */
  }

  /* ── Card & misc cleanup ─────────────────────────────────────────── */
  .card {
    margin: 0 !important;
    page-break-inside: avoid;
    box-shadow: none !important;
  }

  #top-bar,
  .modal,
  .print-btn,
  .full-proxy-btn,
  .qty-badge,
  .hover-bar,
  .add-btn,
  .remove-btn, 
  .powered-by
  {
    display: none !important;
  }
}

/* ── Overview Modal Styling ───────────────────────────────────────────── */
.overview-item {
  display: grid;
  grid-template-columns: 35% 6ch auto;  /* label | variant | controls */
  align-items: center;
  white-space: nowrap;
  gap: 1rem;
  padding: 0.25rem 0;
}
.overview-label {
  grid-column: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
}
.overview-label img {
  width: 1.2em;
  display: block;
}
.overview-variant {
  grid-column: 2;
  justify-self: center;
  font-weight: bold;
  text-align: center;
}
.overview-controls {
  grid-column: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  justify-self: end;
}
.overview-count {
  background: #f0f0f0;
  padding: 0 0.4em;
  border-radius: 3px;
}
.overview-controls button {
  background: #007bff;
  color: #fff;
  border: 1px solid #0056b3;
  border-radius: 4px;
  padding: 0.2em 0.4em;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}
.overview-controls button:hover {
  background: #0056b3;
}

/* ── “Thank Me with a Drink” Button Styling ───────────────────────────────── */

/* optional little drink icon before the text */
#btn-thank::before {
  content: url('images/drinks-icon.svg');
  display: inline-block;
  margin-right: 0.5em;
  width: 1em;
  height: 1em;
  vertical-align: middle;
}

/* ── Modal Content Container ────────────────────────────────────────────── */
#thank-modal .modal-content {
  max-width: 360px;           /* constrain width */
  margin: 2rem auto;          /* center with top/bottom space */
  padding: 1.5rem;            /* internal padding */
  box-sizing: border-box;
}

/* ── Heading ───────────────────────────────────────────────────────────── */
#thank-modal .modal-content h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  text-align: center;
}

/* ── Payment Button Containers (PayPal & Venmo) ────────────────────────── */
#thank-modal #donate-button-container,
#thank-modal a[href*="venmo.com"] {
  width: 100%;
  max-width: 320px;           /* same cap for both */
  margin: 0.75rem auto;       /* center & vertical gap */
  display: block;
}

/* ── Venmo Image Scaling ───────────────────────────────────────────────── */
#thank-modal a[href*="venmo.com"] img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Gap Between PayPal & Venmo ────────────────────────────────────────── */
#thank-modal #donate-button-container + a[href*="venmo.com"] {
  margin-top: 1.5rem;
}

/* ── Close Button Padding ───────────────────────────────────────────────── */
#thank-modal .modal-close {
  top: 0.5rem;
  right: 0.5rem;
  font-size: 1.2rem;
  padding: 0.25rem 0.5rem;
}
/* ── Report Modal Content ──────────────────────────────────────────────── */
#report-modal .modal-content {
  max-width: 360px;
  margin: 2rem auto;
  padding: 1.5rem;
  box-sizing: border-box;
}

/* ── Form Elements ─────────────────────────────────────────────────────── */
#report-form {
  display: flex;
  flex-direction: column;
}
#report-form label {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}
#report-form input,
#report-form textarea {
  font-size: 0.95rem;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 0.25rem;
  box-sizing: border-box;
  width: 100%;
}
#report-form textarea {
  resize: vertical;
}
.modal-submit {
  margin-top: 1rem;
  align-self: center;
  background: #0073e6;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  padding: 0.6em 1.2em;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  transition: background 0.2s ease;
}
.modal-submit:hover {
  background: #005bb5;
}
/* ── Report Form Layout ───────────────────────────────────────────────── */
#report-form {
  display: flex;
  flex-direction: column;
}
#report-form label {
  margin: 0.75rem 0 0.25rem;
  font-size: 0.95rem;
}
#report-form select,
#report-form textarea {
  font-size: 0.95rem;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 0.25rem;
  width: 100%;
  box-sizing: border-box;
}
#report-form textarea {
  resize: vertical;
}

/* ── Fieldsets ────────────────────────────────────────────────────────── */
#report-form fieldset {
  display: flex;              /* lay out labels in a row */
  gap: 1rem;                  /* space between options */
  align-items: center;        /* vertically center radios + text */
  margin: 0.75rem 0;          /* keep your existing vertical spacing */
}

#report-form fieldset label {
  display: inline-flex;
  align-items: center;        /* ensure radio and text line up */
  font-size: 0.95rem;
}

#report-form fieldset input[type="radio"] {
  margin-right: 0.5rem;       /* gap between circle and label text */
}
#report-form legend {
  padding: 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}

/* ── Submit Button ─────────────────────────────────────────────────────── */
.modal-submit {
  margin: 1.5rem auto 0;
  background: #28a745;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  padding: 0.6em 1.2em;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  transition: background 0.2s ease, transform 0.1s ease;
}
.modal-submit:hover {
  background: #218838;
  transform: translateY(-1px);
}
.modal-submit:active {
  transform: translateY(0);
}
/* ── Powered-By Logo ─────────────────────────────────────────────────── */
/* Add “Powered By:” above the logo */
.powered-by {
  position: fixed;
  bottom: 0.5rem;
  right: 0.5rem;
  z-index: 1000;
  opacity: 0.6;
  transition: opacity 0.2s ease;
  text-align: center;               /* center the text above the img */
 text-decoration: none;
}
.powered-by:hover {
  opacity: 1;
}

/* the label above the image */
.powered-by::before {
  content: "Powered By:";
  display: block;
  font-size: 0.75rem;
  color: #000000;                      /* tweak to suit your background */
  margin-bottom: 0.25rem;
}

/* size the image to something unobtrusive */
.powered-by img {
  display: block;
  width: 150px;    /* adjust as needed */
  height: auto;
}
