/* assets/css/str-module3.css
   Version: 0.3.9
   Purpose: Rental Options box layout with original calendar styling.
*/

/* ===== Rental Options Box ===== */
.rental-options {
  border: 1px solid #e2e2e2;
  background: #fff;
  padding: 12px;
  margin-top: 12px;
  border-radius: 4px;
}

.rental-options legend {
  font-weight: 600;
  margin: 0 0 6px 0;
  font-size: 15px;
}

/* ===== Accessory Options Box ===== */
.accessory-options {
  border: 1px solid #e2e2e2;
  background: #fff;
  padding: 12px;
  margin-top: 12px;
  border-radius: 4px;
}
.accessory-options legend {
  font-weight: 600;
  margin: 0 0 6px 0;
  font-size: 15px;
}
.accessory-options-list {
  max-height: 320px;
  overflow-y: auto;
  margin-top: 8px;
}
.accessory-option-item {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin: 6px 0;
}
.accessory-option-item input[type="checkbox"] {
  margin-right: 8px;
}
.accessory-option-item .acc-thumb {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 8px;
}
.accessory-option-item .acc-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.accessory-option-item img {
  width: 40px;
  height: 40px;
  object-fit: cover;
}
.accessory-option-role {
  font-weight: 600;
}
.accessory-option-name {
  font-size: 13px;
}
.accessory-option-qty {
  font-size: 12px;
  margin-left: 6px;
  color: #555;
}
.accessory-options-empty {
  font-size: 13px;
  color: #555;
  margin: 6px 0;
}

/* Radios / Checkboxes */
.str-radio,
.str-checkbox {
  display: block;
  margin: 8px 0;
  line-height: 1.6;
  cursor: pointer;
}

.str-radio input[type="radio"],
.str-checkbox input[type="checkbox"] {
  margin-right: 8px;
  vertical-align: middle;
}

/* Divider used between options (e.g., before/after Damage Protection) */
.str-divider {
  height: 2px;
  border: 0;
  background: #e0e0e0;
  margin: 12px 0;
}

/* ===== Pickup Subpanel ===== */
#str-pickup-options {
  margin-top: 8px;
}

/* Location select */
#pickup_location_select {
  display: inline-block;
  min-width: 280px;
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid #d6d6d6;
  border-radius: 4px;
  background: #fff;
  font-size: 14px;
}

/* Lightweight helper texts */
.str-calendar-loading {
  font-size: 13px;
  opacity: 0.8;
}

.str-info {
  font-size: 13px;
  opacity: 0.9;
}

/* ===== Buttons (light touch; theme will style .button/.button-primary) ===== */
#add-to-queue {
  margin-top: 8px;
  border-radius: 3px;
}

/* ===== Accessibility niceties ===== */
.rental-options input[type="radio"]:focus + span,
.rental-options input[type="checkbox"]:focus + span,
#pickup_location_select:focus {
  outline: 2px solid #2271b1; /* WP blue */
  outline-offset: 1px;
}

/* ===== Small screens ===== */
@media (max-width: 480px) {
  #pickup_location_select {
    min-width: 0;
    width: 100%;
  }
}

/* ===== Calendar Styles (Preserved from original) ===== */

/* Inline Calendar Container */
#rental-calendar-container {
  display: block;
  clear: both;
  width: 100%;
  box-sizing: border-box;
  margin: 1rem 0;
  position: relative;
  z-index: 10;
}

/* Inline Calendar Styles */
.rental-datepicker {
  display: block;
  clear: both;
  width: 100%;
  box-sizing: border-box;
  margin: 0.5rem 0;
  position: relative;
  z-index: 20;
}

.rental-datepicker table {
  width: 100%;
  table-layout: fixed; 
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.rental-datepicker th,
.rental-datepicker td {
  text-align: center;
  padding: 0.5rem;
  border: 1px solid #e1e1e1;
  width: 14.2857%; /* seven columns */
}

.rental-datepicker td.not-month {
  visibility: hidden;
  background: transparent;
  border: none;
}

.rental-datepicker td.unavailable {
  color: #ccc;
  background-color: #f9f9f9;
}

.rental-datepicker td.available {
  cursor: pointer;
  background-color: #e4f4e4;
}

.rental-datepicker td.available:hover {
  background-color: #54bb61;
}

.rental-datepicker td.selected {
  background-color: #43a950;
  color: #fff;
  border-radius: 0.25rem;
}

/* add to assets/css/str-module3.css */
.rental-actions .button {
  background: #43a950;
  border-color: #43a950;
  border-radius: 3px;
}
.rental-actions .button:hover,
.rental-actions .button:focus {
  background: #54bb61;
  border-color: #54bb61;
}
