/* 🔹🔹🔹 HALAMAN RENT 🔹🔹🔹 */
/* ==========================
   Sewa Kendaraan - CSS
============================= */
/* === Filter Kendaraan === */
.rent-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 12px;
  margin: 16px;
  align-items: end;
}

.rent-controls input,
.rent-controls select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: #111827;
  box-sizing: border-box;
}

.rent-controls label {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  gap: 4px;
}

.rent-controls button {
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  background: #f3f4f6;
  color: #374151;
  transition: background 0.2s ease;
}

.rent-controls button:hover {
  background: #e5e7eb;
}

/* Responsif untuk layar kecil */
@media (max-width: 600px) {
  .rent-controls {
    grid-template-columns: 1fr;
  }
}

/* Vehicle Container */
.rent-vehicle-container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  margin: 16px;
}

/* Vehicle Card */
.rent-card {
  width: 300px;
  border-radius: 10px;
  border: 1px solid #e6e7eb;
  padding: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}

.rent-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 6px;
  background: #f3f4f6;
}

.rent-title {
  font-weight: 700;
  margin: 8px 0 4px;
}

.rent-meta {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
}

/* Badges */
.rent-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.rent-badge {
  padding: 6px 4px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.rent-available {
  background: #dcfce7;
  color: #065f46;
}

.rent-booked {
  background: #fee2e2;
  color: #7f1d1d;
}

/* Actions */
.rent-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

button {
  cursor: pointer;
  border: 0;
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 700;
}

.rent-btn-wa {
  background: #25D366;
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.rent-btn-detail {
  background: #1a73e8;
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
}

.rent-btn-calendar {
  background: #6b7280;
  color: white;
  flex: 1;
  justify-content: center;
}

/* No Result */
.rent-no-result {
  color: #9ca3af;
  margin-top: 20px;
  font-style: italic;
}

/* Responsive */
@media (max-width: 720px) {
  .rent-card {
    width: 100%;
  }

  .rent-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .rent-actions {
    flex-direction: column;
  }

  .rent-btn-detail,
  .rent-btn-calendar {
    flex: unset;
    width: 100%;
  }
}

/* === Modal Kalender === */
#rentcalendarModal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.65);
  justify-content: center;
  align-items: center;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
  overflow-y: auto;
  padding: 20px;
  backdrop-filter: blur(4px);
}

#rentcalendarModal.show {
  display: flex;
  opacity: 1;
}

/* === Kontainer Utama Modal === */
#rentcalendarContent {
  background: #ffffff;
  border-radius: 16px;
  padding: 18px;
  width: 96%;
  max-width: 880px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
  animation: popUp 0.3s ease;
}

@keyframes popUp {
  from {
    transform: scale(0.95);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* === Header === */
#rentcalendarContent>div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #f3f4f6;
  padding-bottom: 8px;
}

#rentcalendarTitle {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

#rentcloseCalendar {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: white;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#rentcloseCalendar:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

/* === Area Kalender (lebih kompak) === */
#rentcalendarRoot {
  width: 100%;
  flex: 1;
  min-height: 220px !important;
  max-height: 340px !important;
  overflow-y: auto;
  border-radius: 12px;
  background: #f9fafb;
  padding: 4px;
}

/* === Kontrol (Durasi, WA, Info) === */
#rentcalendarControls {
  display: none;
  flex-direction: column;
  gap: 10px;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 6px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

#rentcalendarControls select,
#rentcalendarControls button {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  font-weight: 600;
  box-sizing: border-box;
}

#rentcalendarControls select:focus {
  outline: none;
  border-color: #1d4ed8;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

#rentcalendarControls button {
  background: linear-gradient(135deg, #25D366, #1DA851);
  color: white;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#rentcalendarControls button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.4);
}

/* === Info Tanggal === */
#rentselectedDateInfo {
  font-style: italic;
  color: #065f46;
  display: none;
  text-align: center;
  font-weight: 600;
}

/* === FullCalendar Styling (super kompak & fix override) === */
.fc {
  background: #fff;
  border-radius: 12px;
  padding: 8px !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 12px !important;
}

/* Toolbar */
.fc-toolbar {
  margin-bottom: 4px !important;
}

.fc-toolbar-title {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #1f2937 !important;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Tombol navigasi */
.fc-button {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  border: none !important;
  border-radius: 6px !important;
  padding: 2px 6px !important;
  font-weight: 600 !important;
  font-size: 11px !important;
  color: white !important;
}

.fc-button:hover {
  transform: scale(1.05);
}

/* === Grid Hari sangat pendek === */
.fc .fc-daygrid-day-frame {
  min-height: 30px !important;
  max-height: 34px !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

.fc .fc-daygrid-day-top {
  padding: 0 !important;
  margin-bottom: 1px !important;
}

/* Nomor hari */
.fc .fc-daygrid-day-number {
  font-weight: 600 !important;
  color: #374151 !important;
  font-size: 10px !important;
  line-height: 1.1 !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Hover & seleksi */
.fc .fc-daygrid-day {
  transition: all 0.15s ease-in-out;
  border-radius: 5px !important;
  cursor: pointer;
}

.fc .fc-daygrid-day:hover {
  background-color: #ecfdf5 !important;
  transform: scale(1.01);
}

.fc .fc-daygrid-day.selected-date {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0) !important;
  border: 2px solid #16a34a !important;
  border-radius: 6px !important;
}

/* === Event (Tanggal Terbooking) === */
.fc .fc-event {
  font-size: 8.8px !important;
  font-weight: 600 !important;
  font-style: italic !important;
  padding: 1px 3px !important;
  margin-top: 1px !important;
  border-radius: 3px !important;
  user-select: none !important;
  color: #7f1d1d !important;
  border: none !important;
  background: linear-gradient(135deg, #fecaca, #f87171) !important;
  box-shadow: 0 1px 1px rgba(248, 113, 113, 0.25) !important;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.4);
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  transform: rotate(-2deg);
  backdrop-filter: blur(1px);
}

.fc .fc-event:hover {
  transform: rotate(-1deg) scale(1.04);
  box-shadow: 0 2px 5px rgba(248, 113, 113, 0.3);
}

/* === TOAST UTAMA (Merah, Tengah Layar – shake cepat & lembut) === */
#renttoast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: rgba(239, 68, 68, 0.88);
  color: #fff;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.2px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 1100;
  max-width: 260px;
  text-align: center;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

#renttoast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
  animation: shake 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* === Efek goyangan === */
@keyframes shake {
  0%, 100% {
    transform: translate(-50%, -50%);
  }
  10%, 90% {
    transform: translate(-52%, -50%);
  }
  20%, 80% {
    transform: translate(-48%, -50%);
  }
  30%, 70% {
    transform: translate(-50%, -52%);
  }
  40%, 60% {
    transform: translate(-50%, -48%);
  }
}

/* ==== MODAL DETAIL KENDARAAN ==== */
#rentdetailModal {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  overflow: auto;
}

#rentdetailModal.show {
  display: flex;
  animation: fadeIn 0.25s ease-in-out;
}

#rentdetailModalContent {
  background-color: #fff;
  padding: 24px;
  border-radius: 14px;
  width: 92%;
  max-width: 480px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  position: relative;
  animation: slideUp 0.3s ease;
  text-align: center;
}

#rentdetailModal .rentclose {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 30px;
  font-weight: bold;
  color: #999;
  cursor: pointer;
  transition: color 0.2s ease;
}

#rentdetailModal .rentclose:hover {
  color: #000;
}

/* ==== GAMBAR ==== */
#rentvehicleDetail img {
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 16px;
}

/* ==== TEKS ==== */
#rentvehicleDetail h2 {
  font-size: 1.4rem;
  color: #111;
  margin-bottom: 8px;
}

#rentvehicleDetail p {
  margin: 6px 0;
  font-size: 0.95rem;
  color: #333;
  line-height: 1.4;
}

#rentvehicleDetail p strong {
  color: #16a34a;
}

/* ==== RESPONSIVE ==== */
@media (min-width: 768px) {
  #rentdetailModalContent {
    max-width: 620px;
    padding: 28px 36px;
    text-align: left;
  }

  #rentvehicleDetail img {
    max-height: 320px;
    border-radius: 12px;
  }

  #rentvehicleDetail h2 {
    font-size: 1.6rem;
    margin-bottom: 12px;
  }

  #rentvehicleDetail p {
    font-size: 1rem;
  }
}

/* ==== ANIMASI ==== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ===== Terms & Conditions Section ===== */
#rentterms {
  margin: 16px;
  margin-top: 30px;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 20px 25px;
  background: #fafafa;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  color: #333;
}

#rentterms h2 {
  margin-bottom: 16px;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

#rentterms p {
  margin-bottom: 10px;
  line-height: 1.6;
}

#rentterms ul {
  padding-left: 0;
  margin-bottom: 15px;
}

#rentterms ul li {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

#rentterms ul li i {
  color: #00b4d8;
}