@font-face {
  font-family: 'Cerebri Sans';
  src: url('https://trattoria-dagianni.com/wp-content/uploads/2023/01/CerebriSansPro-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Cerebri Sans';
  src: url('https://trattoria-dagianni.com/wp-content/uploads/2023/01/CerebriSansPro-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
}

/* Apply to reservation titles */
.csr-title,
.csr-modal-text,
.csr-modal-terms-title {
  font-family: 'Cerebri Sans', sans-serif !important;
}

/* If you want site-wide headings */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Cerebri Sans', sans-serif !important;
}


/* === STEP 1 === */
.csr-step1 {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
}

.csr-title {
  font-size: 18px;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-align: center;
}

.csr-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Always 3 equal columns */
  gap: 12px;
  max-width: 920px;
  margin: 0 auto;
}

.csr-card {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: box-shadow 0.12s ease, transform 0.08s ease;
}

.csr-card:hover,
.csr-card:focus {
  background: #e4ebda;
  border-color: #c4a06e;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  transform: translateY(-4px);
  outline: none;
}

.csr-card.csr-selected {
  border-color: #222;
}

.csr-card-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 6px;
  color: #333; /* fixed */
}

.csr-card-sub {
  font-size: 13px;
  color: #666;
}

/* Prevent hover from overriding text color */
.csr-card:hover .csr-card-title,
.csr-card:hover .csr-card-sub {
  color: #333 !important; /* stays dark */
}

/* Small screens */
@media (max-width: 480px) {
  .csr-step1 {
    padding: 12px;
  }
  .csr-card {
    padding: 14px;
  }
}

/* === MODAL === */
.csr-modal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.csr-modal[aria-hidden="false"] {
  display: flex;
}

.csr-modal[aria-hidden="false"] .csr-modal-overlay {
  background: rgba(0, 0, 0, 0.5);
}

.csr-modal[aria-hidden="false"] .csr-modal-content {
  opacity: 1;
  transform: translateY(0);
}

.csr-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.25s ease;
}

.csr-modal-content {
  position: relative;
  background: #fff;
  padding: 24px 20px;
  max-width: 520px;
  width: 90%;
  border-radius: 12px;
  z-index: 10000;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.25s ease;
}

.csr-modal-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 12px;
}

.csr-modal-body {
  font-size: 14px;
  color: #333;
  margin-bottom: 24px;
  line-height: 1.6;
}

.csr-modal-text {
  font-weight: 500;
  margin-bottom: 16px;
  font-size: 15px;
  color: #222;
}

.csr-modal-list {
  padding-left: 18px;
  margin: 0;
}
.csr-modal-list li {
  margin-bottom: 6px;
}

.csr-modal-terms-title {
  margin: 12px 0 8px;
  font-weight: 700;
  font-size: 15px;
  color: #111;
  border-bottom: 1px solid #ddd;
  padding-bottom: 4px;
}

.csr-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.csr-btn-cancel,
.csr-btn-confirm {
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s ease;
  color: #fff !important;
}

.csr-btn-cancel {
  background-color: #999 !important;
}
.csr-btn-cancel:hover {
  background: #777;
}

.csr-btn-confirm {
  background-color: #44682a !important;
}
.csr-btn-confirm:hover {
  background-color: #33501f !important;
}

.csr-btn-confirm:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.csr-modal-checkbox {
  margin-top: 12px;
  font-size: 14px;
}

.csr-modal-checkbox input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #999;
  border-radius: 4px;
  margin-right: 6px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  display: inline-block;
  vertical-align: middle;
  box-sizing: border-box;
}

.csr-modal-checkbox input[type="checkbox"]:checked {
  background-color: #44682a;
  border-color: #44682a;
}

.csr-modal-checkbox input[type="checkbox"]:checked::after {
  content: '✓';
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* === STEP 2 === */
.csr-step2-card {
  max-width: 760px;
  margin: 40px auto;
  padding: 30px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.csr-step2-card .csr-title {
  text-align: center;
  margin-bottom: 25px;
  font-size: 22px;
  font-weight: 700;
  color: #333;
}

/* Grid */
.csr-step2-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 0 auto 20px;
  max-width: 800px;
}

.csr-step2-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.csr-step2-col label {
  font-weight: 600;
  margin-bottom: 6px;
}

.csr-step2-col input,
.csr-step2-col select,
.csr-step2-col textarea {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  width: 100%;
}

/* Full width span */
.csr-fullwidth {
  grid-column: 1 / -1;
}

/* Actions */
.csr-form-actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  grid-column: 2;
}

.csr-btn-submit,
.csr-btn-back {
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}


.csr-btn-submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background-color: #507C3D; /* Button color */
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    transition: background 0.3s;
}

.csr-btn-submit:hover {
  background-color: #33501f;
  color: #fff;
}

.csr-btn-back {
  background: #e0e0e0;
  color: #333;
}
.csr-btn-back:hover {
  background: #c7c7c7;
}

/* Timeslots */
.csr-timeslots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.csr-timeslot-btn {
  font-size: 14px;
  padding: 8px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #e4ebda;
  cursor: pointer;
  line-height: 1.3;
  transition: all 0.2s ease;
  color: #222;
  min-width: 90px;
  text-align: center;
}

.csr-timeslot-btn:hover {
  background: #d6e0c8;
}
.csr-timeslot-btn.active {
  background: #44682a;
  border-color: #44682a;
  color: #fff;
}

/* Reservation Type (Step 2 Display) */
.csr-selected-type {
  margin-bottom: 0.25rem;
}

.csr-selected-type label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  display: block;
  margin-bottom: 0.2rem;
}

.csr-selected-type-value {
  display: inline-block;
  background: #e4ebda;
  color: #44682a;
  font-weight: 600;
  font-size: 15px;
  padding: 6px 12px;
  border-radius: 6px;
}

.csr-date-wrapper,
#csr-date {
  margin-top: 0 !important;
}

.csr-input, .csr-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 12px; /* match your rounded style */
  font-size: 16px;
  margin-top: 6px;
}

.csr-select {
  background: #fff;
  appearance: none;
  cursor: pointer;
}

.csr-icon svg {
  transition: transform 0.3s ease, stroke 0.3s ease;
}

.csr-card:hover .csr-icon svg {
  transform: scale(1.2) rotate(5deg);
  stroke: #c49a6c; /* gold accent on hover */
}

.csr-card-title {
  color: #333; /* lock text color */
  transition: none;
}

/* Continuous floating animation */
@keyframes floatIcon {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

.csr-icon svg {
  animation: floatIcon 3s ease-in-out infinite;
  stroke: #444; /* default stroke */
  transition: transform 0.3s ease, stroke 0.3s ease;
}

/* Stronger animation on hover */
.csr-card:hover .csr-icon svg {
  transform: scale(1.2) rotate(5deg);
  stroke: #c49a6c; /* gold accent */
}

/* === Step 1 Card Spacing Fix === */
.csr-card .csr-icon {
  margin-bottom: 14px; /* space below icon */
}

.csr-card-title {
  margin: 0 0 8px 0; /* space below title */
}

.csr-card-sub {
  margin: 0; /* reset */
  line-height: 1.4;
}

#csr-guests {
  appearance: none;        /* Removes default arrow */
  -webkit-appearance: none; /* For Safari */
  -moz-appearance: none;   /* For Firefox */
  background: white url("data:image/svg+xml;utf8,<svg fill='black' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>") no-repeat right 10px center;
  background-size: 16px;
  padding-right: 35px; /* Space for custom arrow */
  border: 1px solid #ccc;
  border-radius: 6px;
  height: 40px;
}

/* Make form field labels match Reservation Type title but softer */
.csr-step2 label {
  font-size: 16px;     /* keep same size */
  font-weight: 500;    /* softer than 600 */
  color: #2c3e50;      /* clean dark text */
  margin-bottom: 6px;
  display: block;
}

.csr-timeslot-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Past / disabled timeslot */
.csr-timeslot-btn.disabled,
.csr-timeslot-btn:disabled {
  background: #eee !important;
  border-color: #ddd !important;
  color: #999 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  opacity: 0.6 !important;
}

/* Submitted state */
.csr-btn-submit:disabled span {
  opacity: 1;
  color: #fff;
  font-weight: 600;
}

.csr-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #28a745; /* green to show success */
    cursor: default;
}

/* Spinner */
.csr-spinner {
    display: none; /* hidden by default */
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: absolute;
}

/* Show spinner and hide text on loading */
.csr-btn-submit.loading span {
    visibility: hidden;
}
.csr-btn-submit.loading .csr-spinner {
    display: block;
}

/* Spinner animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


/* Responsive */
@media (max-width: 768px) {
  .csr-step2-grid {
    grid-template-columns: 1fr;
  }
  .csr-form-actions {
    grid-column: 1;
    justify-content: center;
  }
  .csr-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .csr-cards {
    grid-template-columns: 1fr;
  }
}
