/* Bid Calendar - XP Theme */

.bid-calendar {
  padding: 0;
}

.bid-calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: linear-gradient(180deg, #f6f6f6 0%, #ece9d8 100%);
  border-bottom: 1px solid #aca899;
}

.bid-calendar-nav button {
  background: linear-gradient(180deg, #fff 0%, #e3dfd3 100%);
  border: 1px solid #aca899;
  border-radius: 4px;
  padding: 2px 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
}

.bid-calendar-nav button:hover {
  background: linear-gradient(180deg, #e3dfd3 0%, #d6d0c4 100%);
}

.bid-calendar-nav .month-label {
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 13px;
  font-weight: bold;
  color: #0A246A;
}

.bid-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: #aca899;
  border: 1px solid #aca899;
}

.bid-calendar-header {
  background: linear-gradient(180deg, #245EDC 0%, #3E80ED 100%);
  color: white;
  font-size: 10px;
  font-weight: bold;
  text-align: center;
  padding: 4px 2px;
  font-family: 'Trebuchet MS', sans-serif;
}

.bid-day {
  background: white;
  padding: 3px;
  min-height: 68px;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: background 0.15s;
}

.bid-day:hover:not(.bid-day-empty):not(.bid-day-past) {
  background: #e8f0fe;
}

.bid-day-empty {
  background: #f5f5f5;
  cursor: default;
}

.bid-day-past {
  background: #f0efeb;
  opacity: 0.5;
  cursor: not-allowed;
}

.bid-day-closed {
  background: #fff0f0;
}

.bid-day-selected {
  background: #d4e4fc !important;
  outline: 2px solid #245EDC;
  outline-offset: -2px;
}

.bid-day-winning {
  background: #e8f5e9 !important;
}

.bid-day-winning::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: #4caf50;
  border-radius: 50%;
}

.bid-day-charged {
  background: #f3e5f5 !important;
}

.bid-day-number {
  font-size: 13px;
  font-weight: bold;
  color: #333;
  margin-bottom: 2px;
}

.bid-day-past .bid-day-number {
  color: #999;
}

.bid-day-amount {
  font-size: 11px;
  color: #0A246A;
  font-weight: bold;
}

.bid-day-count {
  font-size: 10px;
  color: #666;
}

.bid-day-timer {
  font-size: 9px;
  color: #d32f2f;
  margin-top: auto;
}

/* Bottom bid banner */
.bid-banner {
  background: linear-gradient(180deg, #ece9d8 0%, #d6d0c4 100%);
  border-top: 1px solid #aca899;
  padding: 10px 12px;
}

.bid-banner-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.bid-banner-date {
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 13px;
  font-weight: bold;
  color: #0A246A;
}

.bid-banner-top {
  font-size: 11px;
  color: #333;
}

.bid-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bid-amount-input {
  width: 100px;
  padding: 4px 6px;
  border: 2px inset #d4d0c8;
  border-radius: 2px;
  font-size: 12px;
  font-family: 'Trebuchet MS', sans-serif;
  background: white;
}

.bid-amount-input:focus {
  outline: none;
  border-color: #245EDC;
}

.bid-place-btn {
  background: linear-gradient(180deg, #378B1D 0%, #2D7216 100%);
  color: white;
  border: 1px solid #1a5e00;
  border-radius: 4px;
  padding: 4px 16px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  font-family: 'Trebuchet MS', sans-serif;
}

.bid-place-btn:hover {
  background: linear-gradient(180deg, #2D7216 0%, #245e10 100%);
}

.bid-place-btn:disabled {
  background: #ccc;
  border-color: #999;
  cursor: not-allowed;
  color: #666;
}

.bid-status-msg {
  font-size: 11px;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 3px;
}

.bid-status-msg.success {
  background: #e8f5e9;
  color: #2e7d32;
}

.bid-status-msg.error {
  background: #ffebee;
  color: #c62828;
}

.bid-status-msg.info {
  background: #e3f2fd;
  color: #1565c0;
}

/* Card input area */
.bid-card-section {
  padding: 8px 12px;
  background: #f9f8f5;
  border-top: 1px solid #ddd;
}

.bid-card-label {
  font-size: 10px;
  color: #666;
  margin-bottom: 4px;
}

#bid-card-element {
  padding: 6px 8px;
  background: white;
  border: 2px inset #d4d0c8;
  border-radius: 2px;
  min-height: 24px;
}

#bid-card-errors {
  font-size: 10px;
  color: #d32f2f;
  margin-top: 4px;
}

/* Night mode overrides */
body.night-mode .bid-day {
  background: #2f3640;
}

body.night-mode .bid-day:hover:not(.bid-day-empty):not(.bid-day-past) {
  background: #3a4555;
}

body.night-mode .bid-day-empty {
  background: #252b33;
}

body.night-mode .bid-day-past {
  background: #252b33;
}

body.night-mode .bid-day-selected {
  background: #1a3a5c !important;
}

body.night-mode .bid-day-number {
  color: #ddd;
}

body.night-mode .bid-day-amount {
  color: #7cb3f0;
}

body.night-mode .bid-calendar-nav {
  background: linear-gradient(180deg, #353b48 0%, #2f3640 100%);
}

body.night-mode .bid-calendar-nav .month-label {
  color: #7cb3f0;
}

body.night-mode .bid-banner {
  background: linear-gradient(180deg, #353b48 0%, #2f3640 100%);
}

body.night-mode .bid-banner-date {
  color: #7cb3f0;
}

body.night-mode .bid-banner-top {
  color: #ddd;
}

body.night-mode .bid-amount-input {
  background: #2f3640;
  color: #ddd;
  border-color: #444;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .bid-day {
    min-height: 54px;
    padding: 2px;
  }

  .bid-day-number {
    font-size: 12px;
  }

  .bid-day-amount {
    font-size: 10px;
  }

  .bid-day-count {
    font-size: 9px;
  }

  .bid-day-timer {
    font-size: 8px;
  }

  .bid-banner-actions {
    flex-wrap: wrap;
  }

  .bid-amount-input {
    width: 80px;
  }
}
