/*----------------------------------------
  RESET & GLOBALS
----------------------------------------*/
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #ff6f61;
  --primary-color-2: #ffb5ae;
  --secondary-color: #333;
  --bg-color: #f9f9f9;
  --text-color: #444;
  --imput-color: #000;
  --form-bg: #fff;
  --card-bg: #fff;
  --hover-color: #ddd;
  --droplist-bg: #f1f1f1;
  --radius: 5px;
  --transition: 0.3s ease;
  --font: 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
}

#siteLogo {
  content: url('/f52025/sms26134/SBA/images/blogo.png');
}

html.dark-mode #siteLogo {
  content: url('/f52025/sms26134/SBA/images/wlogo.png');
}

html.dark-mode {
  --primary-color: #ed7d73;
  --primary-color-2: #ff5848;
  --secondary-color: #666666;
  --bg-color: #121212;
  --text-color: #AAAAAA;
  --form-bg: #282828;
  --card-bg: #282828;
  --imput-color: #fff;
  --hover-color: #181818;
  --droplist-bg: #202020;
}

html.high-contrast {
  --primary-color: #A80000; /* Gold */
}

body {
  font-family: var(--font);
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
  min-height: 100vh;
}

#login {
  background: url("images/background.jpg") center/cover no-repeat fixed;
  overflow: hidden;
}

img {
  display: block;
  width: 100%;        /* fill its container’s width */
  height: auto;       /* preserve aspect ratio */
  object-fit: cover;  /* crop if container’s aspect ratio differs */
}

html.large-text {
  font-size: 25px;
}

html.large-text img {
  max-width: 125%;
}

html.large-text .container {
  padding: 1.5rem;
}


/*----------------------------------------
  TYPOGRAPHY
----------------------------------------*/
h1, h2, h3 {
  color: var(--secondary-color);
  margin-bottom: 0.5em;
}

p, label {
  margin-bottom: 0.75em;
  display: block;
}

/*----------------------------------------
  LINKS & BUTTONS
----------------------------------------*/
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: darken(var(--primary-color), 10%);
  text-decoration: underline;
}

button, .view-btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: #fff;
  padding: 0.6em 1.2em;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
  text-align: center;
}

button:hover, .view-btn:hover {
  background-color: #e65b50;
}

/*----------------------------------------
  FORMS
----------------------------------------*/
form {
  background-color: var(--form-bg);
  padding: 1.5em;
  border-radius: var(--radius);
}

.form-group {
  margin-bottom: 2em;
}

input[type="text"],
input[type="password"],
select,
textarea {
  margin-bottom: 1.5em;
  width: 100%;
  padding: 0.6em;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  font-size: 1em;
  transition: border var(--transition);
  background-color: var(--bg-color);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary-color);
  outline: none;
}

/*----------------------------------------
  AUTH PAGE
----------------------------------------*/
.auth-container {
  max-width: 380px;
  margin: 4em auto;
  padding: 2em;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.auth-container h1 {
  text-align: center;
  margin-bottom: 1em;
}

.auth-container > div {
  transition: opacity 0.3s ease;
}

.auth-container .hidden {
  display: none;
  opacity: 0;
}

/*----------------------------------------
  HEADER & NAV
----------------------------------------*/
header {
  background: var(--card-bg);
  padding: 1em 2%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  margin-bottom: 1.5em;
  gap: 1rem;
}

nav {
  display: flex;
  justify-content: flex-end;
  gap: 1.5em;
}

nav a {
  font-weight: 500;
}

.site-brand {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-brand img {
  max-height: 1.5rem;  /* or e.g. 24px, 32px—whatever fits your bar */
  width: 1.5rem;         /* maintain aspect ratio */
  display: block;      /* remove any inline gaps */
  object-fit: contain;
}

.welcome {
  margin: 1rem auto;
  padding: 1.5rem 2rem;
  font-size: 1.25rem;
  background-color: var(--primary-color);
  color: #fff;
  text-align: center;
}


/*----------------------------------------
  SEARCH & GRID (Overview)
----------------------------------------*/
.search-bar {
  width: 90%;
  max-width: 800px;
  margin: 0 auto 1.5em;
  display: flex;
  gap: 0.5em;
  flex-direction: column;
}
.search-bar input[type="text"] {
  flex: 1;
  padding: 8px 12px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  color: var(--imput-color);
}
.search-bar button[type="submit"] {
  padding: 8px 12px;
  font-size: 1rem;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.restaurant-grid {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto 2em;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5em;
}

.restaurant-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  text-align: center;
  padding-bottom: 1em;
}
.restaurant-card img {
  width: 100%;
  display: block;
  object-fit: cover;
  height: 250px;
}
.restaurant-card h2 {
  margin: 0.8em 0 0.4em;
}
.restaurant-card p {
  font-size: 0.95em;
  color: #666;
}

/*----------------------------------------
  DETAIL PAGE
----------------------------------------*/
.details-container {
  width: 90%;
  max-width: 800px;
  margin: 0 auto 2em;
  display: flex;
  flex-direction: column;
  gap: 1.5em;
}

.info p {
  margin-bottom: 0.3em;
}

.gallery {
  display: flex;
  gap: 0.5em;
  overflow-x: auto;
}

.ratings-summary table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.8em;
}
.ratings-summary th,
.ratings-summary td {
  padding: 0.6em;
  border: 1px solid #ddd;
  text-align: left;
}
.ratings-summary th {
  background: var(--card-bg);
}

.reviews .review-card {
  background: var(--card-bg);
  padding: 1em;
  margin-bottom: 1em;
  border-left: 4px solid var(--primary-color);
}
.review-card small {
  display: block;
  margin-top: 0.6em;
  color: #999;
}

/*----------------------------------------
  REVIEW FORM PAGE
----------------------------------------*/
.review-form-container {
  max-width: 500px;
  margin: 2em auto;
}

fieldset {
  border: 1px solid #ccc;
  padding: 1em;
  border-radius: var(--radius);
  margin-bottom: 1em;
}
legend {
  padding: 0 0.5em;
  font-weight: bold;
}

.review-comment-wrapper {
  display: flex;
  flex-direction: column; /* Stack children vertically */
  gap: 1rem; /* Optional spacing between sections */
}

#reviewForm {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  max-height: 50vh;
  background: var(--card-bg);
  display: flex;
  flex-direction: row; /* Stack children vertically */
  flex-wrap: wrap;
  justify-content: space-between; /* optional: spreads them out */
  padding: 1.2em;
  box-shadow: 0 -4px 10px rgba(0,0,0,0.25);
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
  z-index: 999;
  overflow-y: auto;
  align-items: stretch;
  flex-direction: column;
}

#reviewForm.open {
  transform: translateY(0);
}

.slider-group {
  flex: 20%; /* allows wrapping and equal width */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.review-columns {
  display: flex;
  flex-wrap: flex;
  gap: 2rem;
  justify-content: space-between;
}

.rating-section {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
  justify-content: space-between;
}

.comment-section {
  flex: 1 1 35%;
  display: flex;
  flex-direction: column;
}

.comment-section textarea {
  width: 100%;
  resize: vertical;
  padding: 0.5rem;
  font-size: 1rem;
}

/*----------------------------------------
  RESPONSIVE ADJUSTMENTS
----------------------------------------*/
@media (max-width: 768px) {
  .details-container {
    padding: 0 1em;
  }
  nav {
    justify-content: center;
    flex-wrap: wrap;
  }
  .search-bar {
    flex-direction: column;
  }
  #reviewForm {
    align-items: stretch;
  }

  .slider-group {
    width: 20%;
    flex-direction: row;
  }
  
  .rating-section,
  .comment-section {
    flex: 1 1 100%;
  }
}

/*----------------------------------------
  SETTING
----------------------------------------*/
.dropbtn {
  padding: 16px;
  font-size: 1rem;
  border: none;
  cursor: pointer;
}



.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--droplist-bg);
  min-width: 160px;
  overflow: auto;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
}

.dropdown-content a {
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.dropdown a:hover {background-color: var(--hover-color);}

.show {display: block;}

/*----------------------------------------
  OTHER?
----------------------------------------*/
#snackbar {
  visibility: hidden;
  min-width: 250px;
  background-color: #333;
  color: #fff;
  padding: 16px;
  border-radius: 4px;
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

#snackbar.show {
  visibility: visible;
  opacity: 1;
  -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
  animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@-webkit-keyframes fadein {
  from {bottom: 0; opacity: 0;}
  to {bottom: 30px; opacity: 1;}
}

@keyframes fadein {
  from {bottom: 0; opacity: 0;}
  to {bottom: 30px; opacity: 1;}
}

@-webkit-keyframes fadeout {
  from {bottom: 30px; opacity: 1;}
  to {bottom: 0; opacity: 0;}
}

@keyframes fadeout {
  from {bottom: 30px; opacity: 1;}
  to {bottom: 0; opacity: 0;}
}

.rating:not(:checked) > input {
  position: absolute;
  appearance: none;
}

.rating:not(:checked) > label {
  float: right;
  cursor: pointer;
  font-size: 2rem;
  color: #666;
}

.rating:not(:checked) > label:before {
  content: '★';
}

.rating > input:checked + label:hover,
.rating > input:checked + label:hover ~ label,
.rating > input:checked ~ label:hover,
.rating > input:checked ~ label:hover ~ label,
.rating > label:hover ~ input:checked ~ label {
  color: #e58e09;
}

.rating:not(:checked) > label:hover,
.rating:not(:checked) > label:hover ~ label {
  color: #ff9e0b;
}

.rating > input:checked ~ label {
  color: #ffa723;
}

.wrapper {
  --background: var(--primary-color-2);
  --icon-color: #414856;
  --shape-color-01: #b8cbee;
  --shape-color-02: #7691e8;
  --shape-color-03: #fdd053;
  --width: 70px;
  --height: 70px;
  --border-radius: var(--height);
  width: var(--width);
  height: var(--height);
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  border-radius: var(--border-radius);
  display: flex;
  justify-content: center;
  align-items: center;
}
.wrapper .btn {
  background: var(--background);
  width: var(--width);
  height: var(--height);
  position: relative;
  z-index: 3;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(65, 72, 86, 0.05);
  display: flex;
  justify-content: center;
  align-items: center;
  -webkit-animation: plus-animation-reverse 0.5s ease-out forwards;
  animation: plus-animation-reverse 0.5s ease-out forwards;
}
.wrapper .btn::before,
.wrapper .btn::after {
  content: "";
  display: block;
  position: absolute;
  border-radius: 4px;
  background: #fff;
}
.wrapper .btn::before {
  width: 4px;
  height: 20px;
}
.wrapper .btn::after {
  width: 20px;
  height: 4px;
}

.wrapper > svg {
  width: 300px;
  height: 300px;
  position: absolute;
  z-index: 1;
  transform: scale(0);
}
.wrapper > svg .shape {
  fill: none;
  stroke: none;
  stroke-width: 3px;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-origin: 50% 20%;
}
.wrapper input {
  height: 100%;
  width: 100%;
  border-radius: var(--border-radius);
  cursor: pointer;
  position: absolute;
  z-index: 5;
  opacity: 0;
}
.wrapper input:checked ~ svg {
  -webkit-animation: pang-animation 1.2s ease-out forwards;
  animation: pang-animation 1.2s ease-out forwards;
}
.wrapper input:checked ~ svg .shape:nth-of-type(1) {
  transform: translate(25px, 30%) rotate(40deg);
}
.wrapper input:checked ~ svg .shape:nth-of-type(2) {
  transform: translate(-4px, 30%) rotate(80deg);
}
.wrapper input:checked ~ svg .shape:nth-of-type(3) {
  transform: translate(12px, 30%) rotate(120deg);
}
.wrapper input:checked ~ svg .shape:nth-of-type(4) {
  transform: translate(8px, 30%) rotate(160deg);
}
.wrapper input:checked ~ svg .shape:nth-of-type(5) {
  transform: translate(21px, 30%) rotate(200deg);
}
.wrapper input:checked ~ svg .shape:nth-of-type(6) {
  transform: translate(0px, 30%) rotate(240deg);
}
.wrapper input:checked ~ svg .shape:nth-of-type(7) {
  transform: translate(17px, 30%) rotate(280deg);
}
.wrapper input:checked ~ svg .shape:nth-of-type(8) {
  transform: translate(-3px, 30%) rotate(320deg);
}
.wrapper input:checked ~ svg .shape:nth-of-type(9) {
  transform: translate(25px, 30%) rotate(360deg);
}
.wrapper input:checked ~ .btn {
  -webkit-animation: plus-animation 0.5s ease-out forwards;
  animation: plus-animation 0.5s ease-out forwards;
}
.wrapper input:checked ~ .tooltip {
  width: fit-content;
  padding: 30px;
  -webkit-animation: stretch-animation 1s ease-out forwards 0.15s;
  animation: stretch-animation 1s ease-out forwards 0.15s;
  top: -90px;
  opacity: 1;
}

@-webkit-keyframes pang-animation {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.1);
    opacity: 0;
  }
}

@keyframes pang-animation {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.1);
    opacity: 0;
  }
}
@-webkit-keyframes plus-animation {
  0% {
    transform: rotate(0) scale(1);
  }
  20% {
    transform: rotate(60deg) scale(0.93);
  }
  55% {
    transform: rotate(35deg) scale(0.97);
  }
  80% {
    transform: rotate(48deg) scale(0.94);
  }
  100% {
    transform: rotate(45deg) scale(0.95);
  }
}
@keyframes plus-animation {
  0% {
    transform: rotate(0) scale(1);
  }
  20% {
    transform: rotate(60deg) scale(0.93);
  }
  55% {
    transform: rotate(35deg) scale(0.97);
  }
  80% {
    transform: rotate(48deg) scale(0.94);
  }
  100% {
    transform: rotate(45deg) scale(0.95);
  }
}
@-webkit-keyframes plus-animation-reverse {
  0% {
    transform: rotate(45deg) scale(0.95);
  }
  20% {
    transform: rotate(-15deg);
  }
  55% {
    transform: rotate(10deg);
  }
  80% {
    transform: rotate(-3deg);
  }
  100% {
    transform: rotate(0) scale(1);
  }
}
@keyframes plus-animation-reverse {
  0% {
    transform: rotate(45deg) scale(0.95);
  }
  20% {
    transform: rotate(-15deg);
  }
  55% {
    transform: rotate(10deg);
  }
  80% {
    transform: rotate(-3deg);
  }
  100% {
    transform: rotate(0) scale(1);
  }
}
@-webkit-keyframes stretch-animation {
  0% {
    transform: scale(1, 1);
  }
  10% {
    transform: scale(1.1, 0.9);
  }
  30% {
    transform: scale(0.9, 1.1);
  }
  50% {
    transform: scale(1.05, 0.95);
  }
  100% {
    transform: scale(1, 1);
  }
}
@keyframes stretch-animation {
  0% {
    transform: scale(1, 1);
  }
  10% {
    transform: scale(1.1, 0.9);
  }
  30% {
    transform: scale(0.9, 1.1);
  }
  50% {
    transform: scale(1.05, 0.95);
  }
  100% {
    transform: scale(1, 1);
  }
}
/*---------------------------------------
  Dark mode
---------------------------------------*/
/* ================= Dark-Mode Toggle Switch ================= */
.dark-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  vertical-align: middle;
}

.dark-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.dark-switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: background-color .4s;
  border-radius: 24px;
}

.dark-switch .slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: transform .4s;
  border-radius: 50%;
}

.dark-switch input:checked + .slider {
  background-color: #2196f3;
}

.dark-switch input:checked + .slider:before {
  transform: translateX(26px);
}

/* Optional: make slider rounded */
.dark-switch .slider.round {
  border-radius: 24px;
}

.dark-switch .slider.round:before {
  border-radius: 50%;
}

/* ================= Dark-Mode Color Palette ================= */

body.dark-mode {
  background-color: #121212;
  color: #f0f0f0;
}

body.dark-mode header,
body.dark-mode nav,
body.dark-mode #settingsMenu {
  background-color: #1e1e1e;
  color: #f0f0f0;
}

body.dark-mode a {
  color: #90caf9;
}

body.dark-mode input,
body.dark-mode button,
body.dark-mode select,
body.dark-mode textarea {
  background-color: #2c2c2c;
  color: #f0f0f0;
  border: 1px solid #555;
}

/* Smooth transition for theme swap */
body,
header,
nav,
#settingsMenu,
input,
button {
  transition: background-color .3s, color .3s;
}
