/* Contexto meteorológico com a paleta e tipografia da plataforma. */

.weather-panel {
  margin: 24px 0;
  padding: 22px;
  min-width: 0;
  background: #fffefb;
  border: 1px solid #d8d2c8;
  border-top: 3px solid #859773;
  border-radius: 10px;
  color: #303530;
  font: 14px/1.6 Arial, sans-serif;
}

.weather-panel h3 {
  font-size: 20px;
  margin: 0 0 8px;
}

.weather-panel h4 {
  font-size: 16px;
}

.weather-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}

.weather-panel button,
.weather-print button {
  font: inherit;
  padding: 9px 13px;
  border: 1px solid #cabdb6;
  border-radius: 6px;
  background: #f7f3ee;
  color: #374131;
  cursor: pointer;
}

.weather-panel button:disabled {
  opacity: 0.5;
  cursor: default;
}

.weather-panel details {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #ded8ce;
}

.weather-panel summary {
  cursor: pointer;
  font-weight: 600;
}

.weather-panel form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.weather-panel label {
  display: grid;
  gap: 6px;
}

.weather-panel select {
  font: inherit;
  padding: 9px;
  min-width: 220px;
}

.weather-meta {
  font-size: 12px;
  color: #59605a;
}

.weather-warning {
  padding: 12px;
  background: #f3e6e7;
  border-left: 3px solid #88565e;
}

.weather-scroll {
  overflow: auto;
}

.weather-panel table,
.weather-print table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
}

.weather-panel th,
.weather-panel td,
.weather-print th,
.weather-print td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #ded8ce;
  font-variant-numeric: tabular-nums;
}

.weather-panel th,
.weather-print th {
  background: #edf0e7;
}

.weather-print {
  position: fixed;
  inset: 0;
  z-index: 5000;
  overflow: auto;
  padding: 24px;
  background: #e9e9e2;
  color: #303530;
  font: 14px/1.6 Arial, sans-serif;
}

.weather-sheet {
  max-width: 210mm;
  margin: auto;
  padding: 16mm;
  background: white;
  box-sizing: border-box;
}

.weather-sheet h1 {
  color: #88565e;
  font-size: 24px;
  border-bottom: 3px solid #a8b69a;
  padding-bottom: 16px;
}

body.weather-printing {
  overflow: hidden;
}

@media (max-width: 600px) {
  .weather-panel {
    padding: 14px;
  }

  .weather-print {
    padding: 8px;
  }

  .weather-sheet {
    padding: 16px;
  }
}

@media print {
  @page {
    size: A4;
    margin: 16mm;
  }

  body.weather-printing {
    overflow: visible !important;
  }

  body.weather-printing > :not(#weather-print) {
    display: none !important;
  }

  #weather-print {
    position: static !important;
    padding: 0 !important;
    background: white;
    overflow: visible !important;
    font-size: 10pt;
  }

  #weather-print .weather-sheet {
    max-width: none;
    padding: 0;
    margin: 0;
  }

  #weather-print .weather-actions {
    display: none !important;
  }

  #weather-print .weather-scroll {
    overflow: visible;
  }

  #weather-print th,
  #weather-print td {
    padding: 7px;
  }

  #weather-print tr {
    break-inside: avoid;
  }

  #weather-print thead {
    display: table-header-group;
  }
}
