/* Cart Styling */
.cart-items {
  margin-bottom: 20px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding: 10px 0;
}

.cart-item-name {
  flex-grow: 1;
  font-weight: bold;
}

.cart-item-price {
  margin: 0 10px;
  color: #666;
}

.cart-item-total {
  margin: 0 10px;
  font-weight: bold;
}

.cart-item-remove {
  background-color: #f44336;
  color: white;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  margin-left: 5px;
}

.cart-item-remove:hover {
  background-color: #d32f2f;
}

/* Spacing when remove button is not present */
.cart-item.no-remove-button .cart-item-total,
.cart-shelter-header.no-remove-button .cart-item-total,
.cart-addon.no-remove-button .cart-item-total {
  margin-right: 35px; /* Same width as remove button (22px) + margin-left (5px) */
}

.empty-cart {
  padding: 20px;
  text-align: center;
  font-style: italic;
}

/* Add to Cart functionality styling */
.cart-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}

.add-to-basket-btn {
  background-color: #28a745;
  border-color: #28a745;
}

.add-to-basket-btn:hover {
  background-color: #218838;
  border-color: #1e7e34;
}

.success-message {
  margin-top: 15px;
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

/* Floating Basket Icon */
.floating-basket {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: #BF1E2E;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 1000;
  transition: all 0.3s ease;
}

.floating-basket:hover {
  transform: scale(1.2);
}

.floating-basket i {
  color: white;
  font-size: 24px;
}

.floating-basket .basket-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: white;
  color: black;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  border: 2px solid #BF1E2E;
}

/* Addon availability styling */
.extra.unavailable {
  opacity: 0.5;
}

.extra.unavailable input[type="checkbox"] {
  cursor: not-allowed;
}

.unavailable-text {
  color: #dc3545;
  font-style: italic;
}

/* Nested Cart Structure Styling */
.cart-shelter {
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.cart-shelter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background-color: #f9f9f9;
  border-bottom: 1px solid #ddd;
}

.cart-shelter-addons {
  padding-left: 20px;
}

.cart-addon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding: 8px 10px;
  background-color: #fff;
}

.cart-addon .cart-item-name {
  font-weight: normal;
  font-style: italic;
  color: #666;
}

/* Improved addon quantity input styling with plus/minus controls */
.addon-quantity-input {
  width: 40px;
  text-align: center;
  margin: 0;
  padding: 2px 4px;
  border: 1px solid #ccc;
  border-radius: 3px;
  display: inline-block;
  font-size: 12px;
}

.addon-quantity-input:focus {
  outline: none;
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* Cart quantity selector - compact version */
.cart-quantity-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 2px;
    background: white;
    overflow: hidden;
    margin: 0;
    font-size: 0; /* Remove spacing between inline elements */
}

.cart-quantity-selector .qty-btn {
    width: 18px;
    height: 18px;
    border: none;
    background: #f8f9fa;
    color: #666;
    font-weight: 600;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    user-select: none;
}

.cart-quantity-selector .qty-btn:hover {
    background: #e9ecef;
    color: #333;
}

.cart-quantity-selector .qty-btn:active {
    background: #dee2e6;
    transform: scale(0.9);
}

.cart-quantity-selector .qty-btn:disabled {
    background: #f8f9fa;
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.cart-quantity-selector .qty-input {
    width: 24px;
    height: 18px;
    border: none;
    text-align: center;
    font-size: 10px;
    font-weight: 500;
    color: #495057;
    background: white;
    outline: none;
    appearance: textfield;
    -moz-appearance: textfield;
}

.cart-quantity-selector .qty-input::-webkit-outer-spin-button,
.cart-quantity-selector .qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-quantity-selector .qty-input:focus {
    background: #fff;
    box-shadow: inset 0 0 0 1px #007bff;
}

.damage-waiver {
  background-color: #f9f9f9;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.damage-waiver {
  background-color: #f9f9f9;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.order_success,
.order_failure,
.order_invalid {
  display: none;
}

.add-survey {
  font-weight: bold;
  text-decoration: underline;
}

.total {
  font-size: 16px;
  background-color: #f9f9f9;
  border-radius: 4px;
  padding: 10px !important;
}

.bold {
  font-size: 20px;
  font-weight: bold;
}

/* Unavailable addon styles */
.extra.unavailable {
  opacity: 0.5;
  color: #999;
}

.extra.unavailable input[type="checkbox"] {
  cursor: not-allowed;
}

.extra.unavailable .unavailable-text {
  color: #999;
  font-style: italic;
  font-size: 0.9em;
}

.extra.unavailable label {
  color: #999;
  cursor: not-allowed;
}

/* Conflict warning styling */
.conflict-warning {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
  padding: 12px;
  border-radius: 4px;
  margin: 10px 0;
  display: none;
}

.conflict-warning.show {
  display: block;
}

.conflict-warning .warning-icon {
  margin-right: 8px;
  font-weight: bold;
}

/* Form disabled state styling */
.form-disabled {
  opacity: 0.6;
  pointer-events: none;
}

.form-disabled select,
.form-disabled input,
.form-disabled button {
  cursor: not-allowed !important;
}

/* Additional Shelter Section Styles */
.add-another-shelter-section {
  margin-bottom: 25px;
}

.add-another-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid #dee2e6;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.add-another-card:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

.add-another-card-bg-1 {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  background: linear-gradient(45deg, #28a745, #20c997);
  border-radius: 50%;
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
}

.add-another-card-bg-2 {
  position: absolute;
  bottom: -15px;
  left: -15px;
  width: 60px;
  height: 60px;
  background: linear-gradient(45deg, #007bff, #6f42c1);
  border-radius: 50%;
  opacity: 0.1;
  animation: float 8s ease-in-out infinite reverse;
}

.add-another-card-content {
  position: relative;
  z-index: 1;
}

.add-another-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.add-another-icon {
  background: linear-gradient(135deg, #28a745, #20c997);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.add-another-icon i {
  color: white;
  font-size: 18px;
}

.add-another-title {
  margin: 0;
  color: #2c3e50;
  font-weight: 600;
  font-size: 18px;
}

.add-another-subtitle {
  margin: 0;
  color: #6c757d;
  font-size: 14px;
}

.shelter-type-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.shelter-type-link {
  flex: 1;
  min-width: 0;
  padding: 10px 8px;
  border: 2px solid #e9ecef;
  background: white;
  border-radius: 8px;
  color: #495057;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.shelter-type-link:hover {
  background: linear-gradient(135deg, #28a745, #20c997);
  border-color: #28a745;
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.shelter-type-link img {
  width: 35px;
  height: 35px;
  flex-shrink: 0;
}

.shelter-type-link span {
  font-size: 14px;
}

.browse-all-shelters-btn {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.browse-all-shelters-btn:hover {
  background: linear-gradient(135deg, #0056b3, #004085);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
  color: white;
  text-decoration: none;
}

.browse-all-shelters-btn i {
  font-size: 14px;
}

/* Background decoration animations */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* Responsive styles */
@media (max-width: 768px) {
  .shelter-type-buttons {
    gap: 6px;
  }
  
  .shelter-type-link {
    padding: 8px 6px;
  }
  
  .shelter-type-link img {
    width: 20px;
    height: 20px;
  }
  
  .shelter-type-link span {
    font-size: 13px;
  }
  
  .add-another-card {
    padding: 15px;
  }
}
