* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary-color: #3f51b5; /* Indigo */
  --primary-light: #e8eaf6;
  --primary-dark: #303f9f;
  --secondary-color: #009688; /* Teal */
  --secondary-light: #e0f2f1;
  --accent-color: #ff5722; /* Deep Orange */
  --text-primary: #212121;
  --text-secondary: #757575;
  --text-light: #ffffff;
  --background-main: #f9f9f9;
  --background-paper: #ffffff;
  --border-radius: 8px;
  --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

body {
  font-family: "Segoe UI", "Noto Sans TC", -apple-system, BlinkMacSystemFont,
    sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background-main);
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%233f51b5' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background-color: var(--background-paper);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  animation: fadeIn 0.5s ease-out;
}

h1 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 30px;
  font-weight: 600;
  font-size: 2.2rem;
  position: relative;
  padding-bottom: 10px;
}

h1::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 10px;
}

h2 {
  color: var(--primary-color);
  margin-bottom: 20px;
  font-weight: 500;
  font-size: 1.5rem;
  position: relative;
  padding-bottom: 8px;
}

h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 2px;
  background-color: var(--primary-color);
  border-radius: 10px;
}

.main-content {
  display: flex;
  justify-content: center;
}

.calculator {
  width: 100%;
  max-width: 800px;
}

/* Input Section Styling */
.input-section {
  margin-bottom: 30px;
  padding: 25px;
  background-color: var(--background-paper);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  border-left: 4px solid var(--primary-color);
  animation: fadeIn 0.6s ease-out;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 16px;
  transition: var(--transition);
  background-color: #fafafa;
  color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(63, 81, 181, 0.1);
  background-color: #ffffff;
}

.form-group select {
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 36px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Results Section Styling */
.results-section {
  padding: 25px;
  background-color: var(--primary-light);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.7s ease-out;
}

.results-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background-color: var(--primary-color);
}

.result-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 12px 16px;
  background-color: var(--background-paper);
  border-radius: 6px;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.result-item:hover {
  transform: translateX(5px);
  border-left-color: var(--primary-color);
}

.result-item label {
  color: var(--text-secondary);
  font-weight: 500;
}

.result-item span {
  color: var(--primary-color);
  font-weight: 600;
  font-family: "Consolas", "Roboto Mono", monospace;
}

/* Map styles */
.input-mode-toggle {
  display: flex;
  gap: 20px;
  margin-bottom: 14px;
}

.input-mode-toggle label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 20px;
  background-color: #f0f0f0;
  transition: var(--transition);
}

.input-mode-toggle label:hover {
  background-color: #e0e0e0;
}

.input-mode-toggle input[type="radio"] {
  margin: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.input-mode-toggle input[type="radio"]:checked + label {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

/* Tooltip styling */
.tooltip-container {
  position: relative;
  display: inline-block;
}

.tooltip-text {
  visibility: hidden;
  width: 280px;
  background-color: rgba(0, 0, 0, 0.9);
  color: #fff;
  text-align: left;
  border-radius: 6px;
  padding: 12px 15px;
  position: absolute;
  z-index: 9999;
  bottom: 160%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s, visibility 0.3s;
  font-size: 14px;
  line-height: 1.5;
  font-weight: normal;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  white-space: normal;
  word-wrap: break-word;
}

.tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -8px;
  border-width: 8px;
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
}

.tooltip-container:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

.map-container {
  margin-top: 14px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

#map {
  height: 450px;
  width: 100%;
  border-radius: 0;
  margin-bottom: 0;
}

.map-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background-color: #f5f5f5;
  border-bottom-left-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
}

.map-buttons {
  display: flex;
  gap: 10px;
}

.map-buttons button {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 6px;
}

#clear-draw {
  background-color: #f44336;
  color: white;
}

#clear-draw:hover {
  background-color: #d32f2f;
}

#import-kml {
  background-color: var(--primary-color);
  color: white;
}

#import-kml:hover {
  background-color: var(--primary-dark);
}

#export-kml {
  background-color: var(--secondary-color);
  color: white;
}

#export-kml:hover {
  background-color: #00796b;
}

.file-input-container {
  position: relative;
  display: inline-block;
}

.area-display {
  color: var(--text-primary);
  font-weight: 600;
  padding: 8px 12px;
  background-color: var(--primary-light);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: inline-block;
}

.area-display span {
  color: var(--primary-color);
  font-weight: 700;
}

/* Order Details Styling */
.order-details {
  margin-top: 40px;
  padding: 30px;
  background-color: var(--background-paper);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  position: relative;
  animation: fadeIn 0.9s ease-out;
}

.order-details h2 {
  color: var(--text-primary);
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-light);
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.detail-section {
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: var(--border-radius);
  transition: var(--transition);
  border: 1px solid #eee;
  animation: fadeIn 1s ease-out;
}

.detail-section:nth-child(2) {
  animation-delay: 0.1s;
}

.detail-section:nth-child(3) {
  animation-delay: 0.2s;
}

.detail-section:nth-child(4) {
  animation-delay: 0.3s;
}

.detail-section:nth-child(5) {
  animation-delay: 0.4s;
}

.detail-section:nth-child(6) {
  animation-delay: 0.5s;
}

.detail-section:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.detail-section h3 {
  color: var(--primary-color);
  margin-bottom: 18px;
  font-size: 1.1rem;
  font-weight: 600;
  position: relative;
  padding-bottom: 8px;
}

.detail-section h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
  border-radius: 10px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 10px 12px;
  background-color: white;
  border-radius: 4px;
  border-left: 2px solid transparent;
  transition: var(--transition);
}

.detail-item:hover {
  border-left-color: var(--primary-color);
  background-color: #f9fafc;
}

.detail-item label {
  color: var(--text-secondary);
  font-weight: 500;
}

.detail-item span {
  color: var(--primary-color);
  font-weight: 500;
  text-align: right;
}

.order-actions {
  margin-top: 30px;
  text-align: right;
}

.terms-agreement {
  margin-bottom: 20px;
  text-align: left;
}

.terms-agreement .checkbox-label {
  display: flex;
  align-items: center;
}

.terms-agreement .checkbox-text {
  margin-left: 8px;
}

.terms-agreement a {
  color: var(--primary-color);
  text-decoration: underline;
}

.terms-agreement a:hover {
  color: var(--primary-dark);
}

.submit-btn {
  padding: 12px 28px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.submit-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: all 0.5s;
}

.submit-btn:hover::before {
  left: 100%;
}

.submit-btn:hover {
  background-color: var(--primary-dark);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.submit-btn:active {
  transform: translateY(0);
}

/* Price Display Styling */
.total-cost {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 2px solid #eee;
  font-weight: bold;
}

.total-cost label {
  color: var(--text-primary);
  font-size: 1.1rem;
}

.total-cost span {
  color: var(--accent-color);
  font-size: 1.3rem;
  font-weight: 700;
  transition: all 0.3s;
}

.total-cost:hover span {
  animation: pulse 1s ease-in-out;
}

#detail-personnel-cost,
#detail-processing-cost,
#detail-total-cost {
  font-family: "Roboto Mono", "Courier New", monospace;
}

/* Service Options Styling */
.service-options {
  background-color: var(--background-paper);
  border-radius: var(--border-radius);
  padding: 25px;
  margin: 30px 0;
  box-shadow: var(--box-shadow);
  border-left: 4px solid var(--secondary-color);
  animation: fadeIn 0.8s ease-out;
}

.service-options h2 {
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--secondary-light);
}

.service-options h2::after {
  background-color: var(--secondary-color);
}

.option-section {
  margin-bottom: 25px;
}

.option-section h3 {
  color: var(--secondary-color);
  font-size: 1.1rem;
  margin-bottom: 15px;
  padding-left: 12px;
  border-left: 3px solid var(--secondary-color);
}

.option-item {
  margin-bottom: 12px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  background-color: #f9f9f9;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid #eee;
}

.checkbox-label:hover {
  background-color: var(--secondary-light);
  border-color: #ddd;
}

.checkbox-label input[type="checkbox"] {
  margin-right: 12px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--secondary-color);
}

.checkbox-text {
  color: var(--text-primary);
  font-size: 0.95rem;
  flex: 1;
}

.option-price {
  color: var(--secondary-color);
  font-weight: 600;
  font-family: "Roboto Mono", "Courier New", monospace;
  margin-left: 15px;
  min-width: 120px;
  text-align: right;
}

/* Format options styling */
.format-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.format-option {
  flex: 0 0 auto;
  padding: 8px 12px;
  background-color: #f5f5f5;
  border-radius: 4px;
  transition: var(--transition);
  margin-bottom: 0;
  width: auto;
  justify-content: center;
}

.format-option:hover {
  background-color: var(--secondary-light);
}

.format-option input[type="checkbox"] {
  margin-right: 6px;
}

/* Staff item styles */
.staff-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 4px;
  background-color: #f5f5f5;
  margin-bottom: 8px;
}

.staff-role {
  font-weight: 500;
  color: #333;
}

.staff-price {
  color: #4caf50;
  font-weight: 500;
}

.observer-row,
.coordinator-row {
  opacity: 0.6;
}

.observer-row.active,
.coordinator-row.active {
  opacity: 1;
  background-color: rgba(76, 175, 80, 0.1);
}

.total-staff .staff-item {
  background-color: rgba(76, 175, 80, 0.15);
  border-top: 2px solid #4caf50;
  margin-top: 12px;
}

.total-staff .staff-role {
  font-weight: 600;
}

.total-staff .staff-price {
  font-weight: 600;
  font-size: 1.1em;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .details-grid {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 15px;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .order-details {
    padding: 20px;
  }

  .service-options,
  .input-section {
    padding: 20px;
  }
}

@media (max-width: 600px) {
  .detail-item {
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
  }

  .detail-item span {
    padding-left: 5px;
  }

  .map-controls {
    flex-direction: column;
    gap: 10px;
  }

  .area-display {
    width: 100%;
    text-align: center;
  }

  .map-buttons {
    width: 100%;
    justify-content: center;
  }

  #map {
    height: 350px;
  }

  .input-mode-toggle {
    flex-direction: column;
    gap: 10px;
  }

  .checkbox-label {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .option-price {
    align-self: flex-end;
    margin-left: 0;
  }
}

/* Order summary styles */
.order-summary {
  padding: 20px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
}

/* Contact form styles */
.contact-form {
  margin-top: 20px;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.contact-form h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
  color: #444;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 10px;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 15px;
  gap: 15px;
}

.contact-field {
  flex: 1;
  min-width: 250px;
}

.contact-field label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #555;
}

.contact-field input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

.contact-field input:focus {
  border-color: #4caf50;
  outline: none;
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.contact-field textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  resize: vertical;
  font-family: "Noto Sans TC", sans-serif;
}

.contact-field textarea:focus {
  border-color: #4caf50;
  outline: none;
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.full-width {
  width: 100%;
}

.remarks-row {
  margin-top: 5px;
}

/* Disclaimer styles */
.disclaimer {
  margin-top: 15px;
  padding: 10px;
  background-color: #f5f5f5;
  border-left: 3px solid #ff9800;
  border-radius: 4px;
  font-size: 13px;
  color: #666;
}

.disclaimer p {
  margin: 5px 0;
}

.disclaimer strong {
  color: #444;
}

.disclaimer i {
  color: #ff9800;
}

/* 禁限航區資訊樣式 */
.restricted-zones-info {
  background-color: #fff3cd;
  color: #856404;
  padding: 10px;
  margin-top: 10px;
  border-radius: 5px;
  border-left: 5px solid #ffc107;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
}

.restricted-zones-info i {
  margin-right: 10px;
  font-size: 1.2rem;
  color: #e0a800;
}

/* 地圖選項樣式 */
.map-options {
  background-color: #f8f9fa;
  padding: 8px 10px;
  border-radius: 5px 5px 0 0;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  align-items: center;
}

.map-options .checkbox-label {
  margin: 0;
  padding: 0;
  border: none;
}

.map-options .checkbox-text {
  font-size: 0.9rem;
  font-weight: 500;
}

.map-options .checkbox-text i {
  color: #dc3545;
  margin-right: 5px;
}

/* 期望交付日期樣式 */
.delivery-note {
  font-size: 0.85em;
  color: #777;
  margin: 5px 0 0 0;
  line-height: 1.4;
}

input[type="date"] {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s;
}

input[type="date"]:focus {
  border-color: #4a90e2;
  outline: none;
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

/* 地圖控制項樣式 */
.leaflet-control-layers {
  padding: 8px 6px;
  border-radius: 6px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
  background-color: white;
  font-size: 14px;
}

.leaflet-control-layers-list {
  margin-bottom: 0;
}

.leaflet-control-layers-selector {
  margin: 3px 0;
}

.leaflet-control-layers label {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  padding: 3px 0;
}

.leaflet-control-layers-base label:not(:last-child),
.leaflet-control-layers-overlays label:not(:last-child) {
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 8px;
}

.leaflet-control-layers-expanded {
  min-width: 180px;
}

.leaflet-control-layers-toggle {
  width: 36px;
  height: 36px;
}

.leaflet-control-layers input[type="radio"],
.leaflet-control-layers input[type="checkbox"] {
  margin-right: 8px;
  width: 16px;
  height: 16px;
}

.leaflet-control-layers-separator {
  margin: 10px 0;
  height: 1px;
  background-color: #ddd;
}

/* Start Drawing Button Style */
#start-draw {
  background-color: var(--secondary-color);
  color: white;
  border-color: var(--secondary-color);
  position: relative;
  animation: pulse 2s infinite;
}

#start-draw:hover {
  background-color: #00796b;
  animation: none;
}

#start-draw.active {
  transform: scale(0.95);
  box-shadow: 0 0 0 4px rgba(0, 150, 136, 0.3);
}

/* Specific styling for the start-draw button tooltip */
#start-draw .tooltip-text {
  width: 280px;
  top: 0;
  left: 110%;
  bottom: auto;
  transform: translateX(0) translateY(0);
}

#start-draw .tooltip-text::after {
  top: 15px;
  left: -16px;
  margin-left: 0;
  border-color: transparent rgba(0, 0, 0, 0.9) transparent transparent;
}

@media (max-width: 700px) {
  #start-draw .tooltip-text {
    bottom: 50px;
    top: auto;
    left: 0;
  }

  #start-draw .tooltip-text::after {
    top: 100%;
    left: 20%;
    border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
  }
}

#ortho-params {
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#ortho-params h3 {
  color: #2c3e50;
  margin-bottom: 15px;
  font-size: 1.1em;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 8px;
}

#ortho-params .detail-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 4px 0;
  border-bottom: 1px solid #e9ecef;
}

#ortho-params .detail-item:last-child {
  border-bottom: none;
}

#ortho-params .detail-item label {
  color: #495057;
  font-weight: 500;
}

#ortho-params .detail-item span {
  color: #6c757d;
}

/* KML 多邊形標籤樣式 */
.polygon-label.leaflet-tooltip {
  background-color: rgba(63, 81, 181, 0.9) !important;
  color: white !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  white-space: nowrap !important;
  max-width: 200px !important;
  text-align: center !important;
  font-family: "Noto Sans TC", sans-serif !important;
  opacity: 0.9 !important;
}

.polygon-label.leaflet-tooltip::before {
  display: none !important;
}

/* 彈出窗口樣式 */
.custom-popup .leaflet-popup-content-wrapper {
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 6px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
}

.custom-popup .leaflet-popup-content {
  margin: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  font-family: "Noto Sans TC", sans-serif;
}

.custom-popup .leaflet-popup-tip {
  background-color: rgba(255, 255, 255, 0.95);
}
