*,
*::before,
*::after {
  box-sizing: border-box;
}

::-webkit-scrollbar {
    width: 10px
}

::-webkit-scrollbar-track {
    box-shadow: inset 0 0 8px #201d1d;
}

::-webkit-scrollbar-thumb {
    background-image: linear-gradient(to bottom, rgba(255, 0, 0, .55), rgba(0, 128, 0, .55), rgba(0, 0, 255, .55));
}

::-webkit-scrollbar-thumb:hover {
    background-image: linear-gradient(to bottom, red, green, #00f)
}

html {
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background-image: url('background.webp');
  background-attachment: fixed;
  color: #333;
}

#inquiry-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#inquiry-container {
  color: white;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0 auto;
  font-family: Tahoma !important;
  font-size: 20px;
  width: 100%;
  height: auto;
  max-width: 1000px;
  min-width: 300px;
  border: 2px solid crimson;
  border-radius: 4px;
  background-color: #333;
  padding: 5px;
  text-align: center;
}

#whatsapp, #facebook, #email {
  font-size: 15px;
  background-color: crimson;
  color: white;
  border-radius: 4px;
  padding: 10px;
  outline: none;
  border: none;
}

#whatsapp:hover, #facebook:hover, #email:hover {
  background-color: #1dfe25;
  cursor: pointer;
}

/* Utility */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  text-align: center !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.site-header {
  padding: 1rem 0;
  text-align: center;
}

/* intro */
#intro {
  margin: 10px auto;
  border: 2px solid #333;
  border-radius: 4px;
  width: 100%;
  max-width: 900px; /* made fluid with a sensible max */
  padding: 10px;
  font-size: 15px;
  font-weight: 500;
  font-family: Verdana, sans-serif;
  background-color: crimson;
  color: yellow;
  text-align: center;
}

/* responsive tweaks */
@media (max-width: 640px) {
  #intro {
    width: 100%;
    max-width: 550px; /* preserved intent but fluid */
    font-size: 13px;
    font-weight: normal;
  }
}

@media (max-width: 480px) {
  #intro {
    width: 100%;
    max-width: 250px; /* preserved intent but fluid */
    font-size: 12px;
    font-weight: normal;
  }
} 

/* Footer */
.site-footer {
  width: 100%;
  background-color: #333;
  margin-top: 20px;
  text-align: center;
  padding: 1rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: white;
}

/* Controls */
.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0;
  text-align: center;
}

/* corrected media query spelling and adjusted control behavior for small screens */
@media (max-width: 480px) {
  .controls {
    display: block !important;
    margin: 10px auto !important;
    gap: 0.5rem;
    text-align: center !important;
  }
}

.controls input,
.controls select {
  flex: 1;
  font-size: 14px;
  min-width: 0; /* allow inputs to shrink below previous fixed minimum to avoid overflow */
  max-width: 100%; /* ensure they don't exceed the container */
  padding: 5px;
  border-radius: 4px;
}

.controls input {
  border: 1px solid #1abc9c;
  text-align: center;
}

.controls select {
  border: 1px solid crimson;
  background-color: #333;
  color: white;
  text-align: center;
}

.controls .btn {
  flex: 0;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 0.2s ease;
}

.btn.primary {
  background: #1abc9c;
  color: #fff;
}

.btn.primary:hover {
  background: #17a589;
}

.btn.ghost {
  background: #4510f4;
  border: 1px solid #333;
  border-radius: 4px;
  color: white;
  outline: none;
}

.btn.ghost:hover {
  background: crimson;
}

/* Table */
.table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  height: 600px;
  border: 2px solid #333;
  border-radius: 2px;
  padding-bottom: none !important;
  -webkit-overflow-scrolling: touch; /* smoother scrolling on mobile */
}

@media (max-width: 480px) {
  .table-wrap {
    margin: 12px auto !important;
    max-width: 300px !important;
    text-align: center !important;
    font-size: 12px !important;
  }
}

.coupon-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center !important;
  table-layout: auto; /* allow cells to wrap where possible */
  word-wrap: break-word;
}

.coupon-table th,
.coupon-table td {
  border: 1px solid #ddd;
  padding: 0.75rem;
  text-align: center;
  font-size: 0.9rem;
  white-space: normal; /* ensure long text wraps rather than forcing width */
}

.coupon-table th {
  background: #333;
  font-weight: 600;
  color: white;
}

.coupon-table tr:nth-child(even) {
  background: #fbf056;
}

.coupon-table tr:nth-child(odd) {
  background: #c1dbf9
}

.coupon-table tr:hover {
  background: crimson;
  color: white;
}

.get-btn {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: #0cc5a0;
  color: yellow;
  text-decoration: none;
  border-radius: 3px;
  font-size: 0.85rem;
}

.get-btn:hover {
  background-color: #4510f4;
  cursor: pointer;
}

/* Customer inquiry */
#inquiry {
  margin: 10px auto;
  text-align: center;
}

#inquiry-btn , #error-btn {
  font-size: 15px;
  background-color: crimson;
  color: white;
  border-radius: 4px;
  padding: 10px;
  outline: none;
  border: none;
}

#inquiry-btn:hover, #error-btn:hover {
  background-color: #333;
  cursor: pointer;
}

@media (max-width: 480px) {
  #inquiry-btn, #error-btn {
    font-size: 10px;
  }
}

/* Partner websites */
#message {
  margin: 0 auto;
  text-align: center;
  font-size: 15px;
  font-weight: 550;
  color: white;
  text-shadow: 0 0 5px #ff005e, 0 0 10px #ff005e, 0 0 20px #ff005e, 0 0 40px #ff005e, 0 0 80px #ff005e;
  animation: glow 1.5s infinite alternate;
}

@keyframes glow {
    0% {
        text-shadow: 0 0 5px #ff005e, 0 0 10px #ff005e, 0 0 20px #ff005e, 0 0 40px #ff005e, 0 0 80px #ff005e;
    }
    100% {
        text-shadow: 0 0 10px #00d4ff, 0 0 20px #00d4ff, 0 0 40px #00d4ff, 0 0 80px #00d4ff, 0 0 160px #00d4ff;
    }
}

#partners {
  margin: 10px auto;
  text-align: center;
}

.partner-btn {
  font-size: 15px;
  background-color: rgb(20, 20, 220);
  color: white;
  border-radius: 4px;
  padding: 10px;
  outline: none;
  border: none;
}

.partner-btn:first-child {
  display: inline-block;
  margin-bottom: 5px;
}

.partner-btn:nth-child(2) {
  display: inline-block;
  margin-bottom: 5px;
}

.partner-btn:hover {
  background-color: crimson;
  cursor: pointer;
}

@media (max-width: 480px) {
  #message {
    font-size: 12px;
  }

  .partner-btn {
    font-size: 10px;
  }
}

/* Add area */
.add-area {
  text-align: center;
  margin: 1.5rem 0;
}

/* Responsive tweaks */
@media (min-width: 640px) {
  .controls {
    flex-wrap: nowrap;
  }

  .controls input,
  .controls select {
    flex: none;
    width: auto;
    min-width: 0; /* ensure they can shrink */
  }
}

/* Modal overlay and panel */
.modal {
  display: none; /* hidden by default */
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}

.modal-panel {
  position: relative;
  background: #fff;
  margin: 5% auto;
  max-width: 480px;
  max-height: 400px;
  width: 90%;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  overflow: hidden;
  animation: fadeIn 0.25s ease;
  overflow-y: scroll;
}

/* Modal header */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1abc9c;
  color: #fff;
  padding: 0.75rem 1rem;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.modal-header .close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #fff;
  cursor: pointer;
}

/* Modal form */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
}

.modal-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  color: #333;
}

.modal-form input {
  margin-top: 0.25rem;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Modal actions */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive modal tweaks */
@media (min-width: 640px) {
  .modal-panel {
    margin: 8% auto;
  }
}

/* Typography refinements */
h1, h2, h3 {
  font-weight: 600;
  line-height: 1.2;
}

p {
  margin: 0.5rem 0;
}

/* Inputs general */
input, select {
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.4;
  background: #fff;
}

input:focus, select:focus {
  outline: 2px solid #1abc9c;
  border-color: #1abc9c;
}

@media (max-width: 480px) {
  /* allow inputs and controls to fill the container instead of forcing a minimum width */
  input, select, #clearBtn {
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box;
  }
}

/* Buttons refinements */
.btn {
  font-weight: 500;
  text-align: center;
}

.btn:focus {
  outline: 2px solid #1abc9c;
}

/* Modal refinements */
.modal-form input {
  font-size: 0.95rem;
}

.modal-form input:focus {
  border-color: #1abc9c;
  outline: none;
  box-shadow: 0 0 0 2px rgba(26,188,156,0.2);
}

.modal-actions .btn.primary {
  min-width: 100px;
}

/* Accessibility helpers */
[aria-hidden="true"] {
  visibility: hidden;
}

[aria-hidden="false"] {
  visibility: visible;
}

/* Responsive table tweaks */
@media (max-width: 480px) {
  .coupon-table th,
  .coupon-table td {
    padding: 0.4rem;
    font-size: 12px;
  }

  .controls {
    flex-direction: column;
  }

  .controls input,
  .controls select,
  .controls .btn {
    width: 100%;
  }
}

/* Larger screens */
@media (min-width: 768px) {
  .coupon-table th,
  .coupon-table td {
    font-size: 15px;
  }

  .modal-panel {
    max-width: 520px;
  }
}

/* Elegant hover/focus transitions */
input, select, .btn, .get-btn {
  transition: all 0.2s ease;
}

/* Footer refinement */
.site-footer {
  color: white;
  font-size: 13px;
}