/**
 * Bookings Page Styles
 */

.bookings-page {
  max-width: 1440px;
  padding: 20px 51px 100px 51px;
  background: var(--color-bg);
  margin: 0 auto;
}

.bookings-container {
  margin: 0 auto;
}

.bookings-title {
  font-size: 25px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
}

.bookings-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 40px 0;
}

/* Tabs */
.bookings-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bookings-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.bookings-tab svg {
  opacity: 0.5;
  transition: opacity 0.3s;
}

.bookings-tab:hover {
  color: rgba(255, 255, 255, 0.8);
}

.bookings-tab:hover svg {
  opacity: 0.8;
}

.bookings-tab--active {
  color: #fff;
  border-bottom-color: #ffffff;
}

.bookings-tab--active svg {
  opacity: 1;
}

/* Loading */
.bookings-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 16px;
}

.bookings-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #4CAF50;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.bookings-loading p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
}

/* Empty State */
.bookings-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
}

.bookings-empty svg {
  margin-bottom: 24px;
}

.bookings-empty h3 {
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 8px 0;
}

.bookings-empty p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 24px 0;
}

.bookings-empty__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: #ffffff;
  color: var(--color-bg);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 500;
  transition: background 0.3s;
}

/* Bookings List */
.bookings-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Booking Item */
.booking-item {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 20px;
  transition: all 0.3s;
}

.booking-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.booking-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.booking-item__info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.booking-item__date {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
}

.booking-item__created {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

.booking-item__number {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

.booking-item__status {
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  text-transform: lowercase;
}

.booking-item__status--paid {
  background: rgba(76, 175, 80, 0.2);
  color: #4CAF50;
}

.booking-item__body {
  display: flex;
  gap: 20px;
}

.booking-item__image {
  width: 200px;
  height: 140px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
}

.booking-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.booking-item__details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.booking-item__title {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.booking-item__meta {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.booking-item__days,
.booking-item__price {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.booking-item__days svg,
.booking-item__price svg {
  opacity: 0.5;
}

.booking-item__price {
  font-weight: 600;
  color: #4CAF50;
}

.booking-item__address {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.booking-item__address svg {
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.5;
}

.booking-item__actions {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.booking-item__btn {
  padding: 10px 24px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.booking-item__btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

.booking-item__btn--primary {
  background: rgba(76, 175, 80, 0.1);
  border-color: #4CAF50;
  color: #4CAF50;
}

.booking-item__btn--primary:hover {
  background: rgba(76, 175, 80, 0.2);
}

/* Booking Modal */
.booking-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.booking-modal.is-open {
  display: flex;
}

.booking-modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  cursor: pointer;
}

.booking-modal__container {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  z-index: 1;
}

/* Custom scrollbar for booking modal on desktop */
@media (min-width: 769px) {
  .booking-modal__container::-webkit-scrollbar {
    width: 8px;
  }

  .booking-modal__container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
  }

  .booking-modal__container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
  }

  .booking-modal__container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
  }

  .booking-modal__container {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05);
  }
}

.booking-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.booking-modal__title {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.booking-modal__close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.3s;
}

.booking-modal__close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.booking-modal__content {
  padding: 24px;
}

.booking-modal__section {
  margin-bottom: 24px;
}

.booking-modal__section:last-child {
  margin-bottom: 0;
}

.booking-modal__section-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 12px 0;
}

.booking-modal__car {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.booking-modal__car-image {
  width: 120px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
}

.booking-modal__car-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.booking-modal__car-info {
  flex: 1;
}

.booking-modal__car-name {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 4px 0;
}

.booking-modal__car-body {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 8px 0;
}

.booking-modal__car-specs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.booking-modal__car-spec {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.booking-modal__car-spec img {
  width: 16px;
  height: 16px;
  opacity: 0.5;
}

.booking-modal__field {
  margin-bottom: 12px;
}

.booking-modal__field:last-child {
  margin-bottom: 0;
}

.booking-modal__label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 4px;
  display: block;
}

.booking-modal__value {
  font-size: 14px;
  color: #fff;
  font-weight: 500;
}

.booking-modal__footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.booking-modal__contact {
  width: 100%;
  padding: 14px 24px;
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid #4CAF50;
  border-radius: 12px;
  color: #4CAF50;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.booking-modal__contact:hover {
  background: rgba(76, 175, 80, 0.2);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .bookings-page {
    padding: 20px;
  }

  .bookings-title {
    font-size: 25px;
  }

  .bookings-subtitle {
    font-size: 14px;
  }

  .bookings-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .booking-item {
    padding: 16px;
  }

  .booking-item__body {
    flex-direction: column;
  }

  .booking-item__image {
    width: 100%;
    height: 180px;
  }

  .booking-item__actions {
    flex-direction: column;
  }

  .booking-item__btn {
    width: 100%;
    text-align: center;
  }

  .booking-modal__container {
    max-width: 100%;
  }

  .booking-modal__content {
    padding: 20px;
  }

  .booking-modal__car {
    flex-direction: column;
  }

  .booking-modal__car-image {
    width: 100%;
    height: 160px;
  }
}
