/* REUSE HEADER + NAV STYLES */
@import url("style.css");

/* PAGE */
.container {
  padding: 30px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.page-header h2 {
  font-size: 22px;
  font-weight: 600;
}

.add-btn {
  background: #2563eb;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

.add-btn:hover {
  background: #1d4ed8;
}

/* TABLE */
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

th, td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

th {
  background: #f9fafb;
  font-size: 14px;
  text-transform: uppercase;
  color: #6b7280;
}

td {
  font-size: 14px;
}

/* ACTION BUTTONS */
.actions {
  display: flex;
  gap: 10px;
}

.btn-edit {
  background: #facc15;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-delete {
  background: #ef4444;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}

/* NAV ACTIVE */
.nav a.active {
  background: #e5e7eb;
}



/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  width: 320px;
}

.modal-content h3 {
  margin-bottom: 16px;
}

.modal-content input,
.modal-content select {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-actions button {
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}

.save-btn {
  background: #2563eb;
  color: white;
}

#cancelBtn {
  background: #e5e7eb;
}


.swal2-select {
  margin-top: 10px;
  height: 42px;
}


/* Form */


.modal.show .modal-content {
  transform: scale(1);
}

.modal-content input,
.modal-content select {
  padding: 8px;
  font-size: 14px;
}

.actions {
  display: flex;
  justify-content: space-between;
}


.danger {
  background: #ef4444;
  color: white;
}

.modal-content p {
  font-size: 14px;
  color: #6b7280;
}


.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #16a34a;
  color: white;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all .3s ease;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}


.skeleton {
  height: 14px;
  background: linear-gradient(
    90deg,
    #e5e7eb 25%,
    #f3f4f6 37%,
    #e5e7eb 63%
  );
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}


/* ================= FORM BUTTONS ================= */
.actions button {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

/* SAVE / PRIMARY */
.actions button[type="submit"] {
  background: #2563eb;
  color: white;
}

.actions button[type="submit"]:hover {
  background: #1d4ed8;
}

/* CANCEL / SECONDARY */
.actions button[type="button"] {
  background: #e5e7eb;
  color: #374151;
}

.actions button[type="button"]:hover {
  background: #d1d5db;
}

/* DELETE CONFIRM */
.actions .danger {
  background: #ef4444;
  color: white;
}

.actions .danger:hover {
  background: #dc2626;
}


/* ================= GOOGLE MAP ================= */
.map {
  width: 100%;
  height: 220px;
  border-radius: 10px;
  margin-bottom: 12px;
  border: 1px solid #e5e7eb;
}

.map-search {
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-bottom: 8px;
}

#addSearch,
#editSearch {
  width: 100%;
  padding: 10px;
  margin-bottom: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}
