/* ================================
   Room Rent System - Revamped CSS
   All classes prefixed with room-rent-
   ================================ */

/* ================================
   Calendar Grid System
   ================================ */
.room-rent-calendar-grid {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  font-size: 1.18em;
  padding: 8px 0;
  overflow: hidden;
}

.room-rent-calendar-header {
  display: flex;
  width: 100%;
  background: #f5f5f5;
  border-bottom: 1px solid #e0e0e0;
}

.room-rent-calendar-day-header {
  flex: 1 1 0;
  min-width: 0;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9em;
  font-weight: bold;
  color: #666;
  background: #000000;
  color: #cccccc;
  border-radius: 0;
  margin: 0;
}

.room-rent-calendar-row {
  display: flex;
  width: 100%;
  border-bottom: 1px solid #f0f0f0;
}

.room-rent-calendar-row:last-child {
  border-bottom: none;
}

.room-rent-calendar-cell {
  flex: 1 1 0;
  min-width: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9em;
  border-radius: 0;
  margin: 0;
  background: #ffffff;
  color: #333;
  transition: all 0.2s ease;
  cursor: default;
  border-right: 1px solid #f0f0f0;
}

.room-rent-calendar-cell:last-child {
  border-right: none;
}

.room-rent-calendar-cell.room-rent-calendar-available {
  background: #c8a165;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.2);
}

.room-rent-calendar-cell.room-rent-calendar-available:hover {
  background: #b38b4f;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(200,161,101,0.3);
}

.room-rent-calendar-cell.room-rent-calendar-empty {
  background: #fafafa;
  color: #ccc;
  cursor: default;
}

/* ================================
   Modal System
   ================================ */
.room-rent-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.room-rent-modal.room-rent-modal-hidden {
  display: none !important;
}

.room-rent-modal-content {
  background: #000;
  color: #fff;
  border-radius: 12px;
  padding: 0;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
  max-height: 90vh;
  overflow-y: auto;
}

.room-rent-modal-header {
  background: #c8a165;
  color: #000;
  padding: 20px;
  border-bottom: 2px solid #b38b4f;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.room-rent-modal-header h2 {
  margin: 0;
  font-size: 1.4em;
  font-weight: bold;
  flex: 1;
}

.room-rent-modal-close {
  position: relative;
  top: 0;
  right: 0;
  font-size: 1.5em;
  cursor: pointer;
  color: #000;
  font-weight: bold;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  z-index: 1001;
  flex-shrink: 0;
}

.room-rent-modal-close:hover {
  color: #666;
  background-color: rgba(0, 0, 0, 0.1);
}

.room-rent-modal-body {
  padding: 20px;
}

/* ================================
   Room Cards
   ================================ */
.room-rent-rooms-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.room-rent-room-card {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 16px;
  transition: all 0.2s ease;
}

.room-rent-room-card:hover {
  border-color: #c8a165;
  box-shadow: 0 4px 12px rgba(200,161,101,0.2);
}

.room-rent-room-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.room-rent-room-header h3 {
  margin: 0;
  font-size: 1.2em;
  color: #c8a165;
}

.room-rent-room-price {
  background: #c8a165;
  color: #000;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.9em;
}

.room-rent-room-details {
  margin-bottom: 12px;
}

.room-rent-room-details p {
  margin: 4px 0;
  font-size: 0.9em;
  color: #ccc;
}

.room-rent-room-description {
  color: #fff !important;
  font-style: italic;
  margin-bottom: 8px !important;
}

/* ================================
   Time Slots
   ================================ */
.room-rent-time-slots {
  margin-top: 16px;
}

.room-rent-time-slots h4 {
  margin: 0 0 12px 0;
  color: #c8a165;
  font-size: 1em;
  font-weight: bold;
}

.room-rent-time-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.room-rent-time-slot:hover {
  border-color: #c8a165;
  background: #333;
}

.room-rent-time-slot:last-child {
  margin-bottom: 0;
}

.room-rent-time-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.room-rent-time-range {
  font-weight: bold;
  color: #fff;
  font-size: 0.95em;
}

.room-rent-time-period {
  font-size: 0.8em;
  color: #c8a165;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.room-rent-time-price {
  color: #c8a165;
  font-weight: bold;
  font-size: 0.9em;
}

.room-rent-book-slot-btn {
  background: #c8a165;
  border: none;
  color: #000;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
  white-space: nowrap;
}

.room-rent-book-slot-btn:hover {
  background: #b38b4f;
}

/* ================================
   Booking Form
   ================================ */
.room-rent-form-group {
  margin-bottom: 16px;
}

.room-rent-form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: bold;
  color: #c8a165;
}

.room-rent-form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #333;
  border-radius: 6px;
  background: #1a1a1a;
  color: #fff;
  font-size: 1em;
  box-sizing: border-box;
}

.room-rent-form-group input:focus {
  outline: none;
  border-color: #c8a165;
  box-shadow: 0 0 0 2px rgba(200,161,101,0.2);
}

/* ================================
   Pricing Details
   ================================ */
.room-rent-pricing-details {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 16px;
  margin: 20px 0;
}

.room-rent-pricing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.95em;
}

.room-rent-pricing-row:last-child {
  margin-bottom: 0;
  border-top: 1px solid #333;
  padding-top: 8px;
  font-weight: bold;
  font-size: 1.1em;
  color: #c8a165;
}

.room-rent-time-price-row {
  color: #ffd93d;
  font-weight: bold;
}

.room-rent-discount-row {
  color: #51cf66;
  font-weight: bold;
}

.room-rent-total-row {
  font-size: 1.2em !important;
  color: #c8a165 !important;
}

.room-rent-confirm-btn {
  background: #c8a165;
  border: none;
  color: #000;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 1.1em;
  cursor: pointer;
  transition: background-color 0.2s;
  width: 100%;
  margin-top: 16px;
}

.room-rent-confirm-btn:hover {
  background: #b38b4f;
}

/* ================================
   Header Styling
   ================================ */
.room-rent-header {
  background-color: #000000;
  color: #ffffff;
  padding: 20px;
  text-align: center;
  border-bottom: 2px solid #c8a165;
}

.room-rent-header h1 {
  margin: 0;
  font-size: 2.5em;
  font-weight: bold;
  color: #c8a165;
}

/* ================================
   Calendar Container
   ================================ */
#room-rent-calendar-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  min-height: 400px;
}

#room-rent-calendar-wrapper {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* ================================
   Page Layout
   ================================ */
.page[data-name="room-rent"] .page-content {
  margin: 0 !important;
  padding: 0 0 140px 0 !important;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.page[data-name="room-rent"] .page-content > * {
  flex-shrink: 0;
}

.page[data-name="room-rent"] .page-content > #room-rent-calendar-container {
  flex: 1;
  overflow: auto;
}

/* ================================
   Navigation Buttons
   ================================ */
#calendar-prev-month,
#calendar-next-month {
  background: none;
  border: none;
  font-size: 1.6em;
  color: #c8a165;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

#calendar-prev-month:hover,
#calendar-next-month:hover {
  background: rgba(200,161,101,0.1);
  color: #b38b4f;
}

#calendar-month-label {
  font-size: 1.3em;
  font-weight: bold;
  color: #c8a165;
  text-align: center;
  flex: 1;
}

/* ================================
   Responsive Design
   ================================ */
@media (max-width: 480px) {
  .room-rent-calendar-grid {
    max-width: 100%;
    font-size: 1em;
  }
  
  .room-rent-calendar-cell {
    height: 50px;
    font-size: 0.8em;
  }
  
  .room-rent-modal-content {
    max-width: 95%;
    margin: 10px;
  }
  
  .room-rent-header h1 {
    font-size: 2em;
  }
  
  .room-rent-time-slot {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .room-rent-book-slot-btn {
    align-self: stretch;
    text-align: center;
  }
  
  .room-rent-pricing-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .room-rent-time-info {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }
}

/* ================================
   Loading States
   ================================ */
.room-rent-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  color: #c8a165;
}

.room-rent-loading::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid #c8a165;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: room-rent-spin 1s linear infinite;
  margin-left: 10px;
}

@keyframes room-rent-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ================================
   Error States
   ================================ */
.room-rent-error {
  text-align: center;
  padding: 40px 20px;
  color: #ff6b6b;
}

.room-rent-error h3 {
  margin-bottom: 10px;
  color: #ff6b6b;
}

/* ================================
   Success States
   ================================ */
.room-rent-success {
  text-align: center;
  padding: 40px 20px;
  color: #51cf66;
}

.room-rent-success h3 {
  margin-bottom: 10px;
  color: #51cf66;
}

/* ================================
   Payment Modal Styles
   ================================ */
.room-rent-payment-summary {
  margin-bottom: 20px;
}

.room-rent-payment-summary h3 {
  color: #c8a165;
  margin-bottom: 12px;
  font-size: 1.1em;
}

.room-rent-payment-details {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 12px;
}

.room-rent-payment-details p {
  margin: 4px 0;
  font-size: 0.9em;
  color: #ccc;
}

.room-rent-payment-methods {
  margin-bottom: 20px;
}

.room-rent-payment-methods h3 {
  color: #c8a165;
  margin-bottom: 12px;
  font-size: 1.1em;
}

.room-rent-payment-buttons {
  display: flex;
  gap: 12px;
}

.room-rent-payment-method-btn {
  flex: 1;
  background: #2a2a2a;
  border: 1px solid #444;
  color: #fff;
  padding: 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9em;
}

.room-rent-payment-method-btn:hover {
  border-color: #c8a165;
  background: #333;
}

.room-rent-payment-method-btn.active {
  border-color: #c8a165;
  background: #c8a165;
  color: #000;
}

#room-rent-payment-container {
  margin-top: 16px;
  padding: 16px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 6px;
}

#room-rent-payment-error {
  background: #2a1a1a;
  border: 1px solid #ff6b6b;
  border-radius: 6px;
  padding: 12px;
  margin-top: 12px;
}

/* ================================
   Success Modal Styles
   ================================ */
.room-rent-success-details {
  margin-bottom: 20px;
}

.room-rent-success-details h3 {
  color: #c8a165;
  margin-bottom: 12px;
  font-size: 1.2em;
}

.room-rent-success-details p {
  margin: 6px 0;
  font-size: 0.95em;
  color: #ccc;
}

.room-rent-success-message {
  background: #1a2a1a;
  border: 1px solid #51cf66;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 20px;
}

.room-rent-success-message p {
  margin: 0;
  color: #51cf66;
  font-size: 0.9em;
  text-align: center;
}

/* ================================
   Responsive Design for Payment
   ================================ */
@media (max-width: 480px) {
  .room-rent-payment-buttons {
    flex-direction: column;
  }
  
  .room-rent-payment-method-btn {
    text-align: center;
  }
  
  .room-rent-payment-details p {
    font-size: 0.85em;
  }
}
