/**
 * HARB Weather
 *
 * Front-end styles for the HARB Weather plugin output: error notices, query
 * forms, the Google Maps station map, and DataTables 2.x overrides for the
 * weather/station tables. Moved out of the (now retired) theme stylesheet.
 *
 * @package HARB Weather
 */

/* Error notice
--------------------------------------------- */
.harb-weather-error {
  background-color: #f8d7da;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  color: #721c24;
  margin-bottom: 1rem;
  padding: 0.75rem 1.25rem;
  position: relative;
}

/* Query forms
--------------------------------------------- */
.harb-weather-form,
.harb-weather-form-select,
.harb-weather-form-fieldset {
  margin-bottom: 20px;
}

.harb-weather-form-radio-legend {
  margin-bottom: 10px;
}

/* Station map
--------------------------------------------- */
.harb-weather-map {
  background-color: #888;
  height: 700px;
  width: 100%;
}

.harb-weather-map a {
  color: #00F !important; /* Override map library default */
}

/* Tables
--------------------------------------------- */
.harb-weatherstation,
.harb-weather-query {
  margin-bottom: 20px;
}

.harb-weather-query-all,
.harb-weather-query-now,
.harb-weather-sensors {
  font-size: 14px;
}

.harb-weatherstation .dataTable {
  font-size: 14px;
}

.harb-weatherstation .dataTables_wrapper .dataTables_filter input {
  padding: 5px;
}

.harb-weatherstation th {
  text-align: left;
}

/* DataTables 2.x wraps header text in .dt-column-title */
.harb-weatherstation th .dt-column-title,
.harb-weather-data th .dt-column-title,
.harb-weather-query-now th .dt-column-title,
.harb-weather-query-all th .dt-column-title,
.harb-weather-sensors th .dt-column-title {
  text-align: left;
}

/* DataTables 2.x right-aligns dt-type-date/numeric td — override for all weather tables */
.harb-weatherstation table.dataTable td.dt-type-date,
.harb-weatherstation table.dataTable td.dt-type-numeric,
.harb-weather-data table.dataTable td.dt-type-date,
.harb-weather-data table.dataTable td.dt-type-numeric,
.harb-weather-query-now table.dataTable td.dt-type-date,
.harb-weather-query-now table.dataTable td.dt-type-numeric,
.harb-weather-query-all table.dataTable td.dt-type-date,
.harb-weather-query-all table.dataTable td.dt-type-numeric,
.harb-weather-sensors table.dataTable td.dt-type-date,
.harb-weather-sensors table.dataTable td.dt-type-numeric {
  text-align: left;
}

/* DataTables 2.x - force sort arrows to the right on all columns */
table.dataTable th div.dt-column-header {
  flex-direction: row !important;
}

@media only screen and (max-width: 768px) {
  .harb-weatherstation .min-tablet,
  .harb-weather-query-all .min-tablet,
  .harb-weather-query-now .min-tablet,
  .harb-weather-sensors .min-tablet {
    display: none;
  }
}
