/* =========================
   GLOBAL
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: #0d0d0d;
  color: #fff;
}

.hidden {
  display: none !important;
}

.success {
  color: lightgreen;
}

.error {
  color: red;
}

h2 {
  color: #c59d5f;
  margin-bottom: 30px;
}

h3 {
  margin-bottom: 10px;
}

html,
body {
  overflow-x: hidden;
}

.service-btn,
.selection-item {
  background: #2d3748;
  border: 2px solid #4a5568;
  color: white;

  padding: 12px 20px;
  text-align: center;

  border-radius: 8px;
  cursor: pointer;

  transition: all 0.3s ease;

  font-weight: 600;
  margin: 5px;

  display: inline-block;

  white-space: nowrap;

  font-family:
    "Segoe UI Emoji", "Noto Color Emoji", "Apple Color Emoji", sans-serif;
}

/* hover */
.service-btn:hover,
.selection-item:hover {
  border-color: #4a90e2;
  background: #3b4d63;
}

/* aktivno */
.service-btn.active,
.selection-item.selected {
  background-color: #4a90e2 !important;
  border-color: #357abd !important;
  color: white !important;

  transform: scale(1.03);

  box-shadow: 0 4px 10px rgba(74, 144, 226, 0.35);

  font-weight: 600;
}
/* 1. Zajednički stilovi za usluge i datume */

/* Specifičnosti za datume */
#dates-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0;
}

.selection-item {
  font-size: 14px;
  min-width: 90px;
}

/* =========================
   NAV
========================= */
nav {
  position: fixed;
  width: 100%;
  background: #000;
  padding: 15px;
  text-align: center;
  z-index: 1000;
}

nav a {
  color: #fff;
  margin: 0 15px;
  text-decoration: none;
}

nav a:hover {
  color: #c59d5f;
}

/* =========================
   HEADER
========================= */
header {
  height: 100vh;
  background: url("https://images.unsplash.com/photo-1621605815971-fbc98d665033")
    center/cover;
  display: flex;
  justify-content: center;
  align-items: center;
}

header h1 {
  font-size: 40px;
  background: rgba(0, 0, 0, 0.7);
  padding: 20px;
  border: 2px solid #c59d5f;
}

/* =========================
   SECTIONS
========================= */
section {
  padding: 40px 20px;
  text-align: center;
}

/* =========================
   SERVICES
========================= */
.services {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.service-card {
  background: #111;
  color: #fff;
  padding: 20px;
  border-radius: 12px;
  transition: 0.3s;
  border: 1px solid #222;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: #444;
}

.service-card h3 {
  margin-bottom: 10px;
}

.service-card p {
  font-size: 14px;
  color: #ccc;
}

.services-section {
  padding: 40px 20px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.meta {
  margin-top: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price {
  font-weight: bold;
  color: #f1c40f;
}

/* =========================
   GALLERY
========================= */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.gallery img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 10px;
  transition: 0.3s;
}

.gallery img:hover {
  transform: scale(1.1);
}

/* =========================
   FORM
========================= */
form {
  max-width: 500px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

input,
select {
  padding: 15px;
  border: none;
  border-radius: 5px;
}

button {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #2c3e50;
  color: white;
  cursor: pointer;
  transition: 0.3s;
}

button:hover {
  background: #1a252f;
}

/* =========================
   TIME SLOTS
========================= */
.time-grid {
  display: grid;

  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));

  gap: 10px;

  width: 100%;

  max-width: 600px;

  margin: auto;
}
/* .time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;

  max-width: 600px;
  margin: auto;
} */

/* NORMALAN TERMIN */
.time-slot {
  padding: 12px;

  background: #2d3748;
  border: 2px solid #4a5568;

  color: #fff;

  text-align: center;

  cursor: pointer;

  border-radius: 8px;

  transition: all 0.25s ease;

  font-weight: 600;
}

/* HOVER */
.time-slot:hover {
  background: #3b4d63;
  border-color: #4a90e2;

  transform: translateY(-2px);
}

/* ODABRAN TERMIN */
.time-slot.selected {
  background-color: #4a90e2 !important;
  border-color: #357abd !important;

  color: white !important;

  box-shadow: 0 4px 10px rgba(74, 144, 226, 0.35);

  transform: scale(1.03);
}

/* ZAUZET TERMIN */
.time-slot.disabled {
  background: #1f2937;

  border: 2px solid #374151;

  color: #777;

  cursor: not-allowed;

  pointer-events: none;

  opacity: 0.5;
}

/* =========================
   VIBER
========================= */

.btn-sms {
  background-color: #3b82f6;
  color: white;
  border: none;
  /* Povećaj drugu brojku (lijevo/desno) sa 12px na npr. 30px */
  padding: 10px 30px;
  border-radius: 6px; /* Blago zaobljeno za moderniji izgled */
  cursor: pointer;

  /* DODAJ OVO: Minimalna širina osigurava da dugme ne bude usko */
  min-width: 140px;

  font-weight: 600;
  transition: background 0.3s ease;
}

.btn-sms:hover {
  background-color: #2563eb; /* Malo tamnija boja na prelaz mišem */
}

.btn-viber {
  background-color: #7360f2;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-whatsapp {
  background-color: #25d366;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
}

/* =========================
   OTP
========================= */
.otp-box {
  margin-top: 20px;
}

.otp-box .btn {
  padding: 10px 15px;
  background: #3da912;
  color: #fff;
  border: none;
  cursor: pointer;
}

.otp-box .btn:hover {
  background: #444;
}

.otp-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.otp-row input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ccc;
}

/* Glavni omotač */
.otp-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
  /* Osiguraj da ništa ne viri van glavnog ekrana */
  overflow-x: hidden;
}

.otp-container {
  display: flex;
  justify-content: center;
  /* Gap je bitan, ali ako je prevelik na malim ekranima, smanji ga */
  gap: 5px;
  width: 100%;
  max-width: 100%;
  margin-bottom: 20px;
}

.otp-container input {
  /* Ključna stvar: fiksna širina i zabrana sabijanja */
  width: 40px !important;
  height: 50px !important;
  flex-shrink: 0 !important; /* Ovo sprečava da polja postaju uža prema desno */

  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  border: 2px solid #444;
  background: #1a1a1a;
  color: #fff;
  border-radius: 6px;
  outline: none;
  /* Ukloni unutrašnji padding koji može gurnuti broj */
  padding: 0;
  box-sizing: border-box;
}

.otp-container input:focus {
  border-color: #7360f2;
  background: #222;
}

.otp-note {
  width: 100%; /* Da rečenica zauzme čitav red */
  font-size: 13px; /* Malo manji font da ne vrišti */
  color: #ccc; /* Svjetlija boja (siva) jer je pozadina tamna */
  margin: 15px 0 10px 0; /* Razmak iznad i ispod rečenice */
  line-height: 1.4;
  text-align: center; /* Centriran tekst */
  font-style: italic; /* Opciono: nagnut tekst za ljepši izgled */
}

/* Ako tvoj .button-group koristi flex-direction: row, 
   ovo osigurava da rečenica ipak ode u novi red */
.button-group {
  display: flex;
  flex-wrap: wrap; /* Omogućava da idu u novi red */
  justify-content: center;
  gap: 20px; /* Ovo pravi razmak od 20px između svega */
}

/* Ako je ekran baš mali (ispod 360px), malo smanji polja da stanu u red */
@media (max-width: 360px) {
  .otp-container {
    gap: 3px;
  }
  .otp-container input {
    width: 35px !important;
    height: 45px !important;
  }
}

/* Dugme za potvrdu */
.btn-confirm {
  width: 100%;
  max-width: 280px; /* Da ne bude predugačko na desktopu */
  padding: 12px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

.btn-confirm:hover {
  background: #0056b3;
}

/* =========================
   REPORT
========================= */
.report-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.report-card {
  background: white;
  color: #333;
  width: 100%;
  border-radius: 12px;
  padding: 20px;
}

.table-wrapper {
  overflow-x: auto;
  margin-top: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  background: white;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

th {
  background: #2c3e50;
  color: white;
  padding: 10px;
  text-align: left;
}

td {
  padding: 10px;
  border-bottom: 1px solid #eee;
}

.report-container table {
  width: 100%;
  table-layout: auto;
}

.report-container th,
.report-container td {
  padding: 12px 15px;
  white-space: nowrap;
}

.report-container th:nth-child(1) {
  width: 100px;
}

.report-container th:nth-child(2) {
  width: 200px;
}

.report-container th:nth-child(3) {
  width: 180px;
}

.report-container th:nth-child(4) {
  width: 150px;
}

.report-container th {
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.report-container td:first-child {
  font-weight: bold;
}

/* =========================
   BADGES
========================= */
.badge {
  padding: 5px 10px;
  border-radius: 20px;
  color: #111;
  font-weight: bold;
}

/* =========================
   WEEKLY TABLE
========================= */
#weeklyTable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

#weeklyTable th {
  background-color: #2c3e50;
  color: white;
  padding: 15px;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 1px;
  border: none;
}

#weeklyTable td {
  border-bottom: 1px solid #eee;
  border-right: 1px solid #eee;
  padding: 4px;
  min-width: 140px;
  height: 60px;
  vertical-align: middle;
}

#weeklyTable td:first-child {
  background: #f1f3f5;
  font-weight: bold;
  color: #495057;
  width: 80px;
  text-align: center;
}

.slot {
  border-radius: 8px;
  padding: 3px;
  font-size: 11px;
  margin-bottom: 3px;
  color: white;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

.slot:hover {
  transform: scale(1.02);
}

.slot.sisanje {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.slot.fade {
  background: linear-gradient(135deg, #4a0e0e 0%, #800000 100%);
}

.slot.brijanje {
  background: linear-gradient(135deg, #0d5a4b 0%, #13836d 100%);
}

.slot.brada {
  background: linear-gradient(135deg, #d35400 0%, #e67e22 100%);
}

/* =========================
   RASPORED
========================= */
#raspored {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

#raspored h3 {
  color: #2c3e50;
  margin-bottom: 20px;
  font-weight: 600;
}

#weekStart {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  outline: none;
}

#raspored button {
  padding: 8px 16px;
  background-color: #2c3e50;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#raspored button:hover {
  background-color: #34495e;
}

/* =========================
   MODAL
========================= */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
  background-color: #fff;
  margin: 15% auto;
  padding: 25px;
  border-radius: 12px;
  width: 300px;
  text-align: center;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 28px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  line-height: 20px;
}

.close:hover {
  color: red;
}

#adminPass {
  width: 100%;
  padding: 12px;
  margin: 15px 0;
  border: 2px solid #ddd;
  border-radius: 6px;
  outline: none;
}

#adminPass.error-border {
  border-color: #ff4d4d !important;
}

.btn-login {
  background: #007bff;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  font-size: 16px;
  font-weight: bold;
}

.btn-login:hover {
  background: #0056b3;
}

/* =========================
   SELECTION BUTTONS
========================= */
.selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.btn-option {
  padding: 12px 5px;
  border: 1px solid #ddd;
  background-color: #f9f9f9;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  text-align: center;
  transition: all 0.2s ease;
  color: #444;
}

.btn-option.active {
  background-color: #007bff !important;
  border-color: #0056b3;
  color: #ffffff !important;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
  transform: translateY(-2px);
}

.btn-option:hover:not(.active) {
  background-color: #f0f0f0;
  border-color: #bbb;
}

/* =========================
   SUMMARY
========================= */

/* WRAPPER */
#prikaz-izbora {
  margin-top: 20px;
}

/* GLAVNA KARTICA */

.summary-card {
  background: #2d3748;

  border: 1px solid #4a5568;

  border-radius: 14px;

  padding: 16px 18px;

  color: white;

  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);

  animation: fadeIn 0.3s ease;
}
.summary-info {
  display: flex;

  justify-content: space-between;

  align-items: center;

  gap: 20px;

  flex-wrap: wrap;
}
/* NASLOV */
.summary-header {
  color: #7fb3ff;

  font-size: 15px;

  font-weight: 700;

  white-space: nowrap;
  margin-bottom: 10px;
}

/* RED */
.summary-row {
  display: flex;

  align-items: center;

  gap: 8px;
}

/* LABEL */
.summary-label {
  color: #9fb3c8;

  font-size: 14px;

  font-weight: 500;
}

/* VALUE */
.summary-value {
  color: white;

  font-size: 14px;

  font-weight: 700;
}

/* ANIMACIJA */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   FOOTER
========================= */
footer {
  background: #000;
  padding: 20px;
  text-align: center;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 600px) {
  .summary-content {
    gap: 10px;
    font-size: 13px;
  }

  .summary-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  #service {
    width: 100%;
    padding: 12px;
    background-color: #1a1a1a;
    color: white;
    border: 1px solid #333;
    border-radius: 6px;
    font-size: 16px;
    margin-bottom: 15px;
  }

  #service option {
    background-color: #1a1a1a;
    color: white;
  }

  .selection-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
}

#bookBtn {
  /* Sve ovo što si mi poslao ide ovdje */
  width: 100%;
  max-width: 220px;
  display: block; /* Ovo je OK ovdje, jer ga .hidden može pregaziti */
  margin: 15px auto;
  padding: 10px 20px;
  background: #28a745;
  color: white;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
}

#bookBtn:hover {
  background: #218838;
  transform: translateY(-1px); /* Blagi efekat podizanja */
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

#bookBtn:active {
  transform: translateY(0); /* Vraća se kad se klikne */
}
/* .login-message {
  display: none;

  margin-top: 12px;

  color: #e53935;

  font-size: 14px;

  text-align: center;

  font-weight: 500;
} */
/* .login-message {
  display: none;

  margin-top: 10px;
  margin-bottom: 10px;

  color: #e53935;

  font-size: 14px;

  text-align: center;

  font-weight: 500;
}

.modal-content {
  display: flex;

  flex-direction: column;
} */
.login-message {
  display: none;
  /* margin-top: 8px; */
  margin-bottom: 10px;

  color: #e53935;

  font-size: 14px;

  text-align: center;

  font-weight: 500;
}

#bookingMessage {
  margin-top: 10px;
}

#otpMessage {
  white-space: pre-line;
}

.btn-map {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

/* Klasa hidden mora ostati ovakva da bi radila */
#bookBtn.hidden {
  display: none !important;
}

/* KLJUČNA STVAR: */
.hidden {
  display: none !important;
}
