/* Calculator Page Styles */

.calculator-tabs {
  background: var(--text-light);
  border-bottom: 2px solid var(--bg-secondary);
  padding: 20px 0;
  position: sticky;
  top: 70px;
  z-index: 100;
}

.tab-buttons {
  display: flex;
  justify-content: center;
  gap: 0;
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 5px;
  max-width: 800px;
  margin: 0 auto;
}

.tab-btn {
  flex: 1;
  padding: 15px 20px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.tab-btn:hover {
  background: rgba(231, 76, 60, 0.1);
  color: var(--accent-color);
}

.tab-btn.active {
  background: var(--accent-color);
  color: var(--text-light);
}

.tab-btn i {
  font-size: 1.1rem;
}

.calculator-section {
  display: none;
  padding: 60px 0;
}

.calculator-section.active {
  display: block;
}

.calculator-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.calculator-form {
  background: var(--text-light);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.calculator-form h2 {
  color: var(--primary-color);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.calculator-form h2 i {
  color: var(--accent-color);
  font-size: 1.5rem;
}

.calculator-form p {
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 25px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 500;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.form-group input,
.form-group select {
  padding: 12px 40px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-color);
}

.calculator-result {
  background: var(--bg-secondary);
  border-radius: 15px;
  position: sticky;
  top: 150px;
  min-height: 400px;
}

.calculator-result h3 {
  color: var(--primary-color);
  margin-bottom: 25px;
  text-align: center;
}

.result-content {
  min-height: 300px;
  display: flex;
  flex-direction: column;
}

.result-placeholder {
  text-align: center;
  color: var(--text-secondary);
}

.result-placeholder i {
  font-size: 3rem;
  color: var(--accent-color);
  margin-bottom: 20px;
}

.cost-breakdown {
  background: var(--text-light);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.cost-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.cost-item:last-child {
  border-bottom: none;
}

.cost-item.total {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent-color);
  border-top: 2px solid var(--accent-color);
  margin-top: 10px;
  padding-top: 15px;
}

.cost-label {
  color: var(--primary-color);
}

.cost-value {
  font-weight: 600;
  color: var(--primary-color);
}

.cost-item.total .cost-value {
  color: var(--accent-color);
}

.cost-item.extra-fee {
  background: rgba(231, 76, 60, 0.1);
  border-radius: 5px;
  padding: 12px;
  border: 1px solid rgba(231, 76, 60, 0.2);
  margin: 5px 0;
}

.cost-item.extra-fee .cost-label {
  color: var(--accent-color);
  font-weight: 600;
}

.cost-item.extra-fee .cost-value {
  color: var(--accent-color);
  font-weight: 700;
}

.result-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-small {
  padding: 8px 15px;
  font-size: 0.9rem;
  border-radius: 5px;
}

/* Alert styles */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  margin-bottom: 1rem;
}

.alert-info {
  background-color: #d1ecf1;
  border-color: #bee5eb;
  color: #0c5460;
}

.alert-info a {
  color: #0c5460;
  font-weight: 600;
  text-decoration: underline;
}

.alert-info a:hover {
  color: #024248;
}

/* Modern form labels with icons */
.form-label {
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
}

/* Quick Select Cards */
.quick-select-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 20px;
}

.quick-option {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  min-height: 100px;
  justify-content: center;
}

.quick-option:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  border-color: var(--accent-color);
  background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
}

.quick-option.selected {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
  color: #1f2937;
  font-weight: 600;
  border-color: var(--accent-color);
  background: linear-gradient(135deg, #fed7d7 0%, #fc8181 100%);
}

.quick-option i {
  font-size: 1.8rem;
  color: var(--accent-color);
  background: rgba(231, 76, 60, 0.1);
  padding: 12px;
  border-radius: 50%;
  border: 2px solid rgba(231, 76, 60, 0.2);
  transition: all 0.3s ease;
}

.quick-option:hover i {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.quick-option.selected i {
  color: white !important;
  background: linear-gradient(135deg, var(--accent-color), #c53030);
  border-color: transparent !important;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.quick-option span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary-color);
}

.quick-option.selected span {
  color: var(--primary-color);
  font-weight: 600;
}

/* Auction logos */
.auction-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(231, 76, 60, 0.1);
  border: 2px solid rgba(231, 76, 60, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8rem;
  color: var(--accent-color);
  transition: all 0.3s ease;
}

.quick-option:hover .auction-logo {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.quick-option.selected .auction-logo {
  color: white !important;
  background: linear-gradient(135deg, var(--accent-color), #c53030);
  border-color: transparent !important;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Form controls */
.form-control, .form-select {
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 15px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 0.2rem rgba(231, 76, 60, 0.25);
}

.calculator-notes {
  background: var(--bg-secondary);
  padding: 80px 0;
}

.notes-content h2 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 50px;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.note-card {
  background: var(--text-light);
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.note-card:hover {
  transform: translateY(-5px);
}

.note-icon {
  width: 60px;
  height: 60px;
  background: var(--accent-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.note-icon i {
  font-size: 1.5rem;
  color: var(--text-light);
}

.note-card h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
}

.note-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.calculator-cta {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-color) 100%
  );
  color: var(--text-light);
  padding: 80px 0;
  text-align: center;
}

.cta-content h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.cta-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: #ecf0f1;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Estimation Results */
.estimation-summary {
  background: linear-gradient(
    135deg,
    var(--accent-color),
    var(--primary-hover)
  );
  color: var(--text-light);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  text-align: center;
}

.estimation-summary h4 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.estimation-summary .total-amount {
  font-size: 2.5rem;
  font-weight: 700;
}

.estimation-summary .total-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

.cost-details {
  background: var(--text-light);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.cost-details h5 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.detail-value {
  font-weight: 600;
  color: var(--primary-color);
}

.savings-highlight {
  background: #27ae60;
  color: var(--text-light);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  margin-top: 15px;
}

.savings-highlight i {
  margin-right: 8px;
}

/* Fix page header positioning */
.page-header {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--accent-color) 100%
  ) !important;
  color: var(--text-light) !important;
  padding: 120px 0 80px 0 !important;
  text-align: center !important;
  margin-top: 80px !important;
  position: relative !important;
}

.page-header h1 {
  font-size: 3rem !important;
  font-weight: 700 !important;
  margin-bottom: 1rem !important;
  color: var(--text-light) !important;
}

.page-header p {
  font-size: 1.2rem !important;
  color: rgba(255, 255, 255, 0.9) !important;
  margin: 0 !important;
}

/* Ensure proper navbar positioning */
.navbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1000 !important;
}

/* Fix calculator tabs positioning */
.calculator-tabs {
  position: sticky !important;
  top: 80px !important;
  z-index: 100 !important;
  margin-top: 0 !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .page-header {
    padding: 100px 0 60px 0 !important;
    margin-top: 70px !important;
  }

  .page-header h1 {
    font-size: 2.5rem !important;
  }

  .calculator-tabs {
    top: 70px !important;
  }
}

@media (max-width: 480px) {
  .calculator-section {
    padding: 40px 0;
  }

  .calculator-notes {
    padding: 60px 0;
  }

  .calculator-cta {
    padding: 60px 0;
  }

  .tab-btn {
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  .tab-btn i {
    font-size: 1rem;
  }

  .calculator-form h2 {
    font-size: 1.5rem;
  }

  .estimation-summary .total-amount {
    font-size: 2rem;
  }
}

/* Animation for tab switching */
.calculator-section {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading animation */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Error state */
.error-message {
  background: var(--accent-color);
  color: var(--text-light);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  margin-top: 15px;
}

.error-message i {
  margin-right: 8px;
}

/* Success state */
.success-message {
  background: #27ae60;
  color: var(--text-light);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  margin-top: 15px;
}

.success-message i {
  margin-right: 8px;
}

/* Auction Details Section */
.auction-details {
  background: var(--text-light);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #e0e0e0;
}

.details-header {
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-color);
}

.details-header h5 {
  color: var(--primary-color);
  font-weight: 600;
  margin: 0;
  font-size: 1.1rem;
}

.details-info {
  display: grid;
  gap: 8px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 0.95rem;
}

.detail-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.detail-value {
  color: var(--primary-color);
  font-weight: 600;
}

/* Cost item highlight styles */
.cost-item.highlight {
  background: rgba(52, 152, 219, 0.1);
  border-radius: 5px;
  padding: 12px;
  border: 1px solid rgba(52, 152, 219, 0.2);
  margin: 5px 0;
}

.cost-item.highlight .cost-label {
  color: #3498db;
  font-weight: 600;
}

.cost-item.highlight .cost-value {
  color: #3498db;
  font-weight: 700;
}

.cost-item.info {
  background: rgba(241, 196, 15, 0.1);
  border-radius: 5px;
  padding: 12px;
  border: 1px solid rgba(241, 196, 15, 0.2);
  margin: 5px 0;
  font-style: italic;
}

.cost-item.info .cost-label {
  color: #f39c12;
  font-weight: 600;
}

.cost-item.info .cost-value {
  color: #f39c12;
  font-weight: 700;
}

/* Fee Note Section */
.fee-note {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  border-left: 4px solid var(--accent-color);
}

.note-content {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.note-content i {
  color: var(--accent-color);
  font-size: 1.1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.note-content p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Location Search Dropdown Styles */
.location-search-container {
  position: relative;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.location-search {
  width: 100%;
  padding: 12px 45px 12px 45px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s;
  background: var(--text-light);
}

.search-icon {
  position: absolute;
  left: 15px;
  color: var(--text-secondary);
  z-index: 1;
  pointer-events: none;
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  transition: all 0.2s;
}

.search-clear-btn:hover {
  background-color: #f1f1f1;
  color: var(--accent-color);
}

.search-clear-btn.show {
  display: flex;
}

.location-search:focus {
  border-color: var(--accent-color);
  outline: none;
  box-shadow: 0 0 10px rgba(231, 76, 60, 0.1);
}

.location-search-container .location-search:focus {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.location-search-container:has(.location-dropdown.show) .location-search {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.location-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--text-light);
  border: 2px solid #ddd;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.location-dropdown.show {
  display: block;
}

.dropdown-item {
  padding: 12px 15px;
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
  transition: background-color 0.2s;
}

.dropdown-item:hover,
.dropdown-item.highlighted {
  background-color: #f8f9fa;
}

.dropdown-item.selected {
  background-color: var(--accent-color);
  color: var(--text-light);
}

.dropdown-item.highlighted.selected {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.dropdown-item.loading {
  cursor: default;
  color: var(--text-secondary);
  font-style: italic;
}

.dropdown-item.no-results {
  cursor: default;
  color: var(--text-secondary);
  font-style: italic;
  text-align: center;
}

/* Scrollbar styles for dropdown */
.location-dropdown::-webkit-scrollbar {
  width: 6px;
}

.location-dropdown::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.location-dropdown::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.location-dropdown::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* Responsive styles for location search */
@media (max-width: 768px) {
  .location-dropdown {
    max-height: 200px;
  }
  
  .dropdown-item {
    padding: 15px;
    font-size: 1rem;
  }
  
  .location-search {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

@media (max-width: 480px) {
  .search-input-wrapper {
    margin-bottom: 10px;
  }
  
  .location-dropdown {
    position: fixed;
    top: auto;
    left: 10px;
    right: 10px;
    max-height: 50vh;
    border-radius: 8px;
    border: 2px solid var(--accent-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  }
}
