/* ==========================================
   LAYOUTS CSS - Page Structures
   Plaza Park Pay
   ========================================== */

/* Headers */
.header {
  background: var(--color-white);
  padding: 16px 20px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  position: relative;
  z-index: 1;
}

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

.header-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo {
  height: 28px;
  width: auto;
  margin-left: auto;
  margin-right: 8px;
  opacity: 0.9;
}

.logo-container {
  margin-bottom: 8px;
}

.logo-img {
  max-width: 120px;
  height: auto;
}

.tagline {
  font-size: var(--font-size-base);
  color: var(--color-gray);
  font-weight: 500;
}

.back-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--color-black);
  font-size: 20px;
}

/* Content Areas */
.content {
  padding: 0;
  padding-bottom: 100px;
  background: var(--color-background); /* Ensure tan background */
}

.section {
  margin: 12px 20px;
}

.section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: 8px;
}

.section-count {
  background: var(--color-gray-lighter);
  color: var(--color-gray);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: var(--font-size-xs);
}

/* Bottom Trays */
.bottom-tray {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-white);
  border-radius: 12px 12px 0 0;  /* Only top corners rounded */
  box-shadow: 0 -2px 12px rgba(0,0,0,0.08); /* Lighter shadow */
  z-index: 100;
  transform: translateY(0);
  transition: transform 0.3s ease;
}

.tray-content {
  padding: 12px 20px;  /* Less vertical padding - was 16px */
  display: flex;
  align-items: center;
  gap: 16px;
}

.tray-buttons {
  display: flex;
  gap: 12px;
  padding: 12px 20px;  /* Match tray-content padding */
}

/* Map Section */
.map-section {
  height: 150px;
  background: var(--color-gray-lighter);
  position: relative;
  overflow: hidden;
}

.map-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.map-marker {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background: var(--color-primary);
  border: 3px solid var(--color-white);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(255,107,53,0.4);
  z-index: 2;
}

.lot-info-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(255,255,255,0.98), rgba(255,255,255,0.9));
  padding: 12px 20px;
  backdrop-filter: blur(10px);
}

.lot-address {
  font-size: 13px;
  color: var(--color-gray);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  line-height: 1.3;
}

.location-dot {
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Lists */
.lots-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Lot Card Specific Layout */
.lot-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.lot-info {
  flex: 1;
}

.lot-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-black);
  margin: 0;
  margin-bottom: 4px;
  line-height: 1.3;
}

.lot-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-black);
  line-height: 1.2;
  margin: 0;
  display: inline-block;
}

.lot-rates {
  text-align: right;
}

.rate-primary {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-black);
}

.rate-unit {
  font-size: 14px;
  color: var(--color-gray);
}

.rate-secondary {
  font-size: var(--font-size-sm);
  color: var(--color-gray-light);
  margin-top: 2px;
}

/* Parking Availability */
.parking-available {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f0f0f0;
}

.availability-dot {
  width: 8px;
  height: 8px;
  background: var(--color-success);
  border-radius: 50%;
}

.availability-text {
  font-size: var(--font-size-sm);
  color: var(--color-success);
  font-weight: 500;
}

/* Session Layout */
.session-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.session-details {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-size-sm);
  color: var(--color-gray);
}

.session-info {
  display: flex;
  gap: 12px;
}

/* Ticket Layout */
.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.ticket-info {
  flex: 1;
}

.ticket-id {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-black);
  margin-bottom: 4px;
}

.ticket-location {
  font-size: 14px;
  color: var(--color-gray);
  margin-bottom: 2px;
}

.ticket-date {
  font-size: var(--font-size-sm);
  color: var(--color-gray-light);
}

.ticket-amount {
  text-align: right;
}

.amount-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
}

.amount-label {
  font-size: 12px;
  color: var(--color-gray);
}

/* Price Section */
.price-section {
  flex: 0 0 auto;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.price-label {
  font-size: 14px;
  color: var(--color-gray);
}

.price-value {
  font-size: 28px;
  font-weight: 600;
}

.tax-note {
  font-size: var(--font-size-xs);
  color: var(--color-gray-light);
  margin-top: 2px;
}

/* Help Section */
.help-section {
  text-align: center;
  padding: 24px 20px 20px;
  color: var(--color-gray);
}

.help-text {
  font-size: 14px;
  margin-bottom: 8px;
}

.help-email {
  color: var(--color-primary);
  font-size: var(--font-size-md);
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  padding: 8px 0;
}

.help-email:active {
  opacity: 0.8;
}

/* Stats Bar */
.stats-bar {
  background: var(--color-white);
  padding: 8px 20px 10px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-around;
  text-align: center;
}

.stat-item {
  flex: 1;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-black);
}

.stat-label {
  font-size: var(--font-size-xs);
  color: var(--color-gray-light);
  text-transform: uppercase;
  margin-top: 2px;
}

/* Timer Layout */
.timer-wrapper {
  width: 240px;  /* Slightly smaller */
  height: 240px;
  margin: 0 auto 12px;  /* Less bottom margin */
  position: relative;
}

.timer-svg {
  width: 100%;
  height: 100%;
}

.timer-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.time-display {
  font-size: 32px;  /* Slightly smaller */
  font-weight: 300;
  letter-spacing: 1px;
  margin-bottom: 2px;  /* Less margin */
}

.time-label {
  font-size: 12px;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Quick Pay Section */
.quick-pay-section {
  margin-bottom: 20px;
}

.quick-pay-info {
  flex: 1;
}

.quick-pay-label {
  font-size: 11px;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.quick-pay-lot {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
  line-height: 1.2;
}

.quick-pay-plate {
  font-size: 13px;
  opacity: 0.9;
  line-height: 1.2;
}

.quick-pay-arrow {
  font-size: 24px;
  opacity: 0.9;
}

/* Savings Tip */
.savings-tip {
  background: #FFF3E0;
  border: 1px solid #FFE0B2;
  padding: 12px 16px;
  margin: 0 20px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius-md);
}

.savings-text {
  font-size: 14px;
  color: #E65100;
  font-weight: 500;
}

.savings-action {
  font-size: 14px;
  color: #E65100;
  background: none;
  border: none;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

/* Daily Info */
.daily-info {
  text-align: center;
  padding: 32px 20px;
  color: var(--color-gray);
}

/* ==========================================
   FREE PARKING UI COMPONENTS
   ========================================== */

/* Free Parking Banner */
.free-parking-banner {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: white;
  padding: 10px 20px;
  margin: 0;
  margin-bottom: 12px;
  display: none;
  box-shadow: 0 2px 6px rgba(76, 175, 80, 0.25);
  text-align: center;
}

.free-banner-content {
  /* No longer needed but kept for compatibility */
}

.free-banner-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 2px;
  line-height: 1.2;
  letter-spacing: 0.3px;
}

.free-banner-subtitle {
  font-size: 13px;
  opacity: 0.95;
  line-height: 1.3;
}

/* Cooldown Info Box */
.info-box {
  background: #FFF3E0;
  border: 1px solid #FFE0B2;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 0 20px 16px;
  display: none;
  align-items: flex-start;
  gap: 12px;
}

.cooldown-info {
  background: #E3F2FD;
  border-color: #BBDEFB;
}

.info-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.info-content {
  flex: 1;
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

.info-content strong {
  color: #333;
  font-weight: 600;
}

/* Free Duration Badge (on duration picker) */
.free-duration-badge {
  background: #4CAF50;
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-left: 8px;
  position: relative;
  top: -2px;
  animation: free-celebration 2s ease-in-out infinite;
}

/* Free Parking Bottom Tray */
.bottom-tray.free-parking-tray {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: white;
}

.free-price-display {
  flex: 1;
}

.free-price-label {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 2px;
  line-height: 1.2;
  letter-spacing: 0.5px;
}

.free-price-subtitle {
  font-size: 13px;
  opacity: 0.95;
  line-height: 1.3;
}

/* Price Comparison (for partially free) */
.price-comparison {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.original-price {
  font-size: 18px;
  color: var(--color-gray-light);
  text-decoration: line-through;
  font-weight: 500;
}

.price-arrow {
  font-size: 16px;
  color: var(--color-gray);
}

.discounted-price {
  font-size: 28px;
  font-weight: 600;
  color: #4CAF50;
}

.savings-note {
  font-size: 12px;
  color: #4CAF50;
  font-weight: 600;
  background: rgba(76, 175, 80, 0.1);
  display: inline-block;
  padding: 4px 8px;
  border-radius: 8px;
}

/* Success Button Variant */
.btn-success {
  background: white !important;
  color: #4CAF50 !important;
  font-weight: 700;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-success:active {
  background: rgba(255, 255, 255, 0.95) !important;
  transform: scale(0.98);
}

/* Free Celebration Animation */
@keyframes free-celebration {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Details Card */
.details-card {
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 12px;  /* Less padding */
  margin-bottom: 12px;  /* Less bottom margin */
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;  /* Reduced from 10px */
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 14px;
  opacity: 0.6;
}

.detail-value {
  font-size: var(--font-size-md);
  font-weight: 600;
}
/* ==========================================
   COOLDOWN WARNING MODAL
   ========================================== */

.cooldown-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: none;
}

.cooldown-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.cooldown-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 20px;
  padding: 32px 24px;
  width: 90%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  text-align: center;
  animation: modalSlideIn 0.3s ease-out;
}

.cooldown-title {
  font-size: 24px;
  font-weight: 700;
  color: #ef4444;
  margin: 0 0 16px 0;
  line-height: 1.2;
}

.cooldown-message {
  font-size: 16px;
  color: #4b5563;
  margin-bottom: 24px;
  line-height: 1.5;
}

.cooldown-time {
  font-weight: 700;
  color: #ef4444;
  font-size: 18px;
}

.cooldown-options {
  display: flex;
  gap: 12px;
  flex-direction: column;
}

.btn-pay-now {
  background: linear-gradient(135deg, #f26a3c 0%, #ff9800 100%);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(242, 106, 60, 0.3);
}

.btn-pay-now:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(242, 106, 60, 0.4);
}

.btn-cancel {
  background: transparent;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-cancel:hover {
  background: #f9fafb;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -45%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}
