* {
  --border-radius: .5rem;
  --shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;
  --shadow-hover: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;
  --bg: #f5f5fa;
}

/* --- Card container --- */
.ew-current-weather {
  display: flex;
  flex-wrap: wrap;
  max-width: 900px;
  border-radius: var(--border-radius);
  overflow: hidden;
  color: #1f2937;
  box-shadow: var(--shadow);
  background: var(--bg);
  margin: 0 auto;
}

/* --- Left column: main + today summary --- */
.ew-main-today {
  display: flex;
  flex-direction: column;
  color: var(--contrast);
  padding: 32px 24px;
  min-width: 280px;
  flex-shrink: 0;
  transition: background 0.3s ease;
  border-radius: var(--border-radius);
  position: relative;
  text-align: center;
}

/* --- Header: city + time --- */
.ew-header {
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
}

.ew-header {
    position: relative;
}

.last-update {
    position: absolute;
    right: 0;
    bottom: -15px;

    font-size: 0.7rem;
	font-weight: 700;
    color: var(--accent-3);
    text-transform: uppercase;
}

/* --- Main icon and temperature --- */
.ew-icon img,
.ew-icon svg {
  width: 120px;
  height: 120px;
}

.ew-temperature {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  padding-bottom: 2rem;
}

/* --- Today summary --- */
.ew-today {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.ew-today .ew-row {
  background: rgba(255,255,255,0.3);
  padding: 8px 12px;
  border-radius: var(--border-radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.875rem;
  min-width: 70px;
  transition: all .25s;
}

.ew-today .ew-row:hover {
  background: rgba(255,255,255,0.5);
}

.ew-today .ew-row span {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-3);
  text-transform: uppercase;
}

.ew-today .ew-row img,
.ew-today .ew-row svg {
  width: 36px;
  height: 36px;
}

.ew-today .ew-row strong {
  font-size: 1rem;
  font-weight: 600;
}

/* --- Right column: detailed cards --- */
.ew-details-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  padding: 32px 24px;
  flex: 1;
}

/* --- Detail card --- */
.ew-details-container .ew-row {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all .25s;
}

.ew-details-container .ew-row:hover {
  box-shadow: var(--shadow-hover);
}

.ew-details-container .ew-row span {
  position: absolute;
  top: 8px;
  left: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-3);
  text-transform: uppercase;
}

.ew-details-container .ew-row img,
.ew-details-container .ew-row svg {
  width: 64px;
  height: 64px;
}

.ew-details-container .ew-row strong {
  font-size: 1.25rem;
  font-weight: 700;
}

/* --- Wind rotation inside detail --- */
.ew-wind {
  display: inline-block;
  transform: rotate(var(--wind-deg, 0deg));
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .ew-current-weather {
    flex-direction: column;
	flex-wrap: nowrap;
  }
}

/* Footer */
.ew-current-weather > footer {
  flex: 0 0 100%;
  margin-top: auto;
}

.ew-current-weather footer {
  text-align: center;
}

.ew-current-weather footer h2 {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-3);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* Tomorrow Compact */
.ew-tomorrow-weather > div {
  flex: 1 1 50%;
}

.ew-tomorrow-weather .ew-temperature {
  font-size: 3rem;
}

.ew-tomorrow-weather .ew-row img {
  margin-top: 1rem;
}

/* Tomorrow Table */
.ew-hourly-table {
	width: 100%;
	font-size: 0.85rem;
}

/* Header */
.ew-hourly-table thead th {
	position: sticky;
	top: 0;
	z-index: 3;
	background: var(--bg);
	color: #444;
	font-weight: 600;
	font-size: 0.7rem;
	text-transform: uppercase;
	padding: 0.75rem 0.75rem;
	text-align: left;
}

/* Header icons */
.ew-hourly-table img {
	width: 36px;
	height: 36px;
	min-width: 24px;
	min-height: 24px;
	margin-right: 4px;
	vertical-align: middle;
}

/* Body rows */
.ew-hourly-table tbody tr {
	background: #ffffff;
}

/* Cells */
.ew-hourly-table tbody td {
	padding: 0.75rem;
	color: #333;
	white-space: nowrap;
}

/* First + last cell rounding */
.ew-hourly-table tbody tr td:first-child {
	font-weight: 600;
}

/* Temperature emphasis */
.ew-hourly-table tbody td:nth-child(3) {
	font-weight: 600;
}

/* Rain + wind muted */
.ew-hourly-table tbody td:nth-child(4),
.ew-hourly-table tbody td:nth-child(5) {
	color: #666;
	font-size: 0.8rem;
}

.ew-hourly-table tbody tr:hover {
	background: var(--bg);
	box-shadow: var(--shadow);
	transform: translateY(-1px);
	transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

@media (max-width: 500px) {
  .ew-hourly-table th span {
    display: none;
  }
}

/* Map */
.ew-map-wrapper {
    width: 100% !important;
    max-width: 100% !important;
}

.ew-map-container,
#ew-weather-map {
    width: 100%;
    height: 100%;
}

#ew-weather-map {
    border-radius: .5rem;
}
.ew-weather-marker img {
    filter: drop-shadow(0 0 1px rgba(0,0,0,0.5));
}

.ew-temp-label {
    font-weight: bold;
    color: var(--contrast);
	white-space: nowrap;
}

/* Current Estonia Weather Grid */
.ew-estonia-weather-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 16px;
}
.ew-weather-card {
	background: #f9f9f9;
	border-radius: 8px;
	padding: 12px;
	text-align: center;
	box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.ew-card-icon img.ew-card-icon {
	width: 48px;
	height: 48px;
	filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.7));
}
.ew-card-temp {
	font-size: 18px;
	font-weight: bold;
	margin: 8px 0;
}
.ew-card-details span {
	display: block;
	font-size: 12px;
	color: #333;
}