/* styles.css */
/* ===== Global Styles ===== */
body,
html {
  margin: 0;
  padding: 0;
  font-family: "Arial", sans-serif;
  background-color: #f5f7fa;
  color: #002366; /* royal blue text */
}

header {
  background-color: #002366;
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header .logo {
  height: 75px;
}

main {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1rem;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h2 {
  color: #002366;
}

label {
  display: block;
  margin-top: 1rem;
}

/* button {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background-color: #c0c0c0;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  color: #002366;
  font-weight: bold;
}

button:hover {
  opacity: 0.9;
} */

/* ===== Dashboard Sections ===== */
.dashboard-section {
  /* display: none;  */
  margin: 2rem auto;
  max-width: 900px;
  padding: 1rem;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dashboard-section h2 {
  color: #002366;
  margin-bottom: 1rem;
}

input,
select {
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
}

ul {
  list-style: none;
  padding: 0;
}

ul li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  margin-bottom: 0.5rem;
  background-color: #f0f4f8;
  border-radius: 8px;
}

ul li button {
  text-decoration: none;
  /* color: white; */
  font-weight: bold;
  transition: color 0.3s ease;
}

/* ===== Profile Page ===== */
.profile-card {
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-card h2 {
  margin-bottom: 1rem;
}

.profile-card input {
  margin-bottom: 1rem;
}

/* ===== Buttons ===== */
.btn-primary {
  background-color: #002366;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
}

.btn-primary:hover {
  background-color: #001244;
}

.btn-danger {
  background-color: #ff4d4d;
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
}

.btn-danger:hover {
  background-color: #e60000;
}

/* Calendar styles */
.calendar {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 1rem;
}
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.month-nav button {
  margin-left: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: #e6eef9;
  color: #002366;
  font-weight: 600;
}
.grid-weekdays,
.grid-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.grid-weekdays div {
  padding: 8px 6px;
  text-align: center;
  font-weight: 700;
  color: #556;
  background: transparent;
}
.day {
  min-height: 80px;
  border-radius: 8px;
  margin: 4px;
  padding: 6px;
  position: relative;
  cursor: pointer;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.day.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f7f7f7;
}
.day .dateNum {
  font-weight: 700;
  font-size: 0.95rem;
  color: #002366;
}
.day.selected {
  outline: 3px solid #bfe1ff;
}
.day.has-availability {
  background: linear-gradient(135deg, #e8f6ea, #f0fff5);
  border: 1px solid #8bd08a;
}
.availability-indicator {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.availability-indicator.set {
  background: #28a745;
}
.controls {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Modal */
/* .modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 50;
} */
/* ===== Modal Improvements ===== */
.modal {
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal h3 {
  margin-top: 0;
  font-size: 1.5rem;
  color: #002366;
}

#selectedDatesLabel {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 0.5rem;
}

.range-block {
  background-color: #f1f5f9;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 1rem;
  margin-top: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.time-range {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.slot {
  padding: 8px;
  text-align: center;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid #d6d6d6;
  background: #f8f9fb;
  font-weight: 500;
}

.slot.selected {
  background-color: #007bff;
  color: white;
  border-color: #0056b3;
}

.modal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.modal-footer button {
  min-width: 100px;
  padding: 0.5rem 0.8rem;
  font-weight: bold;
}

/* Scrollbar for long content */
.modal::-webkit-scrollbar {
  width: 8px;
}

.modal::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.time-range {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}
.slots-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}
.slot {
  padding: 8px;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  border: 1px solid #d6d6d6;
  background: #f8f9fb;
  user-select: none;
}
.slot.excluded {
  text-decoration: line-through;
  opacity: 0.6;
  background: #fff0f0;
  border-color: #ffbcbc;
}
.modal-footer {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  margin-top: 1rem;
}
.btn-secondary {
  background: #f0f4f8;
  color: #002366;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  border: none;
}
.btn-danger {
  background: #ff4d4d;
  color: white;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  border: none;
}
.small-muted {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.4rem;
}

.range-block {
  border: 1px solid #ccc;
  padding: 0.8rem;
  border-radius: 8px;
  margin-top: 0.8rem;
  background: #f9fafc;
}
.legend {
  display: flex;
  justify-content: space-around;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #444;
}
.legend-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-right: 6px;
}
.legend-dot.full {
  background: #28a745;
}
.legend-dot.partial {
  background: #ffc107;
}
.legend-dot.none {
  background: #dc3545;
}

.availability-indicator.full {
  background: #28a745;
}
.availability-indicator.partial {
  background: #ffc107;
}
.availability-indicator.none {
  background: #dc3545;
}

#servicesList li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  margin-bottom: 0.5rem;
  background-color: #f0f4f8;
  border-radius: 8px;
  cursor: grab;
}

#servicesList li.dragging {
  opacity: 0.5;
}

.drag-handle {
  cursor: grab;
  margin-right: 10px;
  font-size: 1.2rem;
}

.service-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.8rem;
  margin-bottom: 0.5rem;
  background-color: #f0f4f8;
  border-radius: 8px;
  cursor: grab;
}

.service-thumb {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 10px;
  flex-shrink: 0;
}

.service-thumb.placeholder {
  background-color: #c0c0c0;
}

.service-info {
  flex-grow: 1;
}

.service-actions button {
  margin-left: 5px;
}

.drag-handle {
  cursor: grab;
  margin-right: 8px;
  font-size: 1.2rem;
}

/* Add to styles.css */
.slot.selected {
  background-color: #007bff;
  color: white;
  border-radius: 6px;
  font-weight: bold;
}

.update-pulse {
  animation: pulseFade 0.4s ease-in-out;
}

/* .modal {
  position: fixed;
  top:0; left:0;
  width:100%; height:100%;
  background: rgba(0,0,0,0.5);
  display:flex;
  justify-content:center;
  align-items:center;
  z-index:1000;
} */

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  width: 300px;
  text-align: center;
}

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-backdrop.show {
  display: flex;
}

.modal {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
}

.calendar {
  margin: 10px 0;
}

.calendar-day {
  padding: 8px;
  text-align: center;
  border-radius: 5px;
  cursor: pointer;
}

.calendar-day.available {
  background-color: #007bff;
  color: white;
}

.calendar-day.unavailable {
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
}

.slot-btn {
  margin: 5px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #007bff;
  background: white;
  cursor: pointer;
}

.slot-btn.selected {
  background: #007bff;
  color: white;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #002366;
  padding: 1rem 2rem;
}

nav .logo {
  height: 75px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

nav ul li a {
  text-decoration: none;
  font-weight: bold;
  color: #002366;
  transition: color 0.3s ease;
}

nav ul li a:hover {
  color: #ffc107; 
}


.nav-btn {
  text-decoration: none;
  font-weight: bold;
  color: #002366;
  background: none;
  border: none;
  border-radius: 6px;
  transition: background 0.3s ease, color 0.3s ease;
}

.nav-btn:hover {
  color: #ffc107; /* gold hover color like other links */
  background: rgba(255, 255, 255, 0.1);
}


.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  background: url("./img/BOC\ Logo.jpg") no-repeat center center/cover;
  color: white;
  text-align: center;
  min-height: 80vh;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5); /* dark overlay */
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-content img {
  max-width: 200px;
  margin-bottom: 1rem;
}

.hero-content h1 {
  font-size: 2.5rem;
  margin: 0.5rem 0;
  letter-spacing: 1px;
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.image-gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.image-gallery img:hover {
  transform: scale(1.05);
}

table {
  width: 90%;
  margin: 30px auto;
  border-collapse: collapse;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

th, td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

th {
  background-color: #222;
  color: white;
}

button.roleBtn {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background-color: #007BFF;
  color: white;
}

button.roleBtn:hover {
  background-color: #0056b3;
}

/* ===== Responsive Navbar ===== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 22px;
  cursor: pointer;
}

.hamburger span {
  height: 3px;
  width: 100%;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}


@keyframes pulseFade {
  0% {
    background-color: rgba(0, 255, 0, 0.15);
  }
  100% {
    background-color: transparent;
  }
}

@media (max-width: 900px) {
  nav {
    position: relative;
  }

  .hamburger {
    display: flex;
    z-index: 1001;
  }

  nav ul {
    position: fixed;
    top: 0;
    right: -100%;
    width: 50%;
    height: 100%;
    flex-direction: column;
    background-color: #002366;
    padding-top: 6rem;
    transition: right 0.3s ease;
    gap: 1.5rem;
    z-index: 1000;
  }

  nav ul.open {
    right: 0;
  }

  nav ul li a {
    color: #002366;
    font-size: 1.2rem;
    /* text-align: center; */
    display: block;
  }

  nav ul li a:hover {
    color: #ffc107;
  }

  .menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 999;
  }

  .menu-backdrop.show {
    display: block;
  }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .dashboard-section,
  .profile-card {
    margin: 1rem;
    padding: 1rem;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .image-gallery img {
    height: 150px;
  }
}
