/* GN Weather Station Public Styles */

.gnws-widget {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	max-width: 400px;
	margin: 20px 0;
}

.gnws-widget h2 {
	margin: 0 0 20px 0;
	font-size: 24px;
	font-weight: 600;
}

.gnws-container {
	display: flex;
	flex-direction: column;
}

.gnws-weather-data {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
}

.gnws-temperature {
	display: flex;
	align-items: baseline;
	font-size: 48px;
	font-weight: bold;
}

.gnws-temperature .value {
	margin-right: 5px;
}

.gnws-temperature .unit {
	font-size: 28px;
	opacity: 0.9;
}

.gnws-details {
	flex: 1;
}

.gnws-details p {
	margin: 5px 0;
	font-size: 14px;
	opacity: 0.9;
}

.gnws-widget-compact {
	max-width: 250px;
	padding: 15px;
}

.gnws-widget-compact h2 {
	font-size: 18px;
	margin-bottom: 10px;
}

.gnws-widget-compact .gnws-temperature {
	font-size: 36px;
}

.gnws-current-weather {
	background-color: #f5f5f5;
	padding: 15px;
	border-radius: 4px;
	border-left: 4px solid #667eea;
	margin: 10px 0;
}

.gnws-current-weather p {
	margin: 0;
	font-weight: 600;
	color: #333;
}

/* Responsive Design */
@media (max-width: 600px) {
	.gnws-widget {
		max-width: 100%;
		padding: 15px;
	}

	.gnws-widget h2 {
		font-size: 20px;
		margin-bottom: 15px;
	}

	.gnws-weather-data {
		flex-direction: column;
		align-items: flex-start;
	}

	.gnws-temperature {
		font-size: 40px;
	}

	.gnws-temperature .unit {
		font-size: 24px;
	}

	.gnws-details {
		width: 100%;
	}
}

/* Loading state */
.gnws-loading {
	opacity: 0.6;
	pointer-events: none;
}

.gnws-loading::after {
	content: '';
	display: inline-block;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/* Error state */
.gnws-error {
	background-color: #f8d7da;
	border: 1px solid #f5c6cb;
	color: #721c24;
	padding: 15px;
	border-radius: 4px;
	margin: 10px 0;
}


/* ---------- GNWS Dashboard (public) ---------- */
.gnws-dashboard {
  max-width: 960px;
  margin: 16px auto;   /* CENTER */
}

.gnws-dashboard .gnws-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  background: #fff;
  margin-bottom: 10px;
}

.gnws-dashboard .gnws-toolbar label {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  opacity: 0.95;
}

.gnws-dashboard select,
.gnws-dashboard input[type="date"] {
  min-width: 160px;
  padding: 6px 8px;
}

.gnws-dashboard .button {
  padding: 7px 12px;
  cursor: pointer;
}

.gnws-dashboard .gnws-btn-primary {
  background: #2271b1;
  border-color: #2271b1;
  color: #fff;
}

.gnws-dashboard .gnws-custom-range {
  display: none;
  align-items: end;
  gap: 10px;
}

.gnws-chart-wrap {
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.gnws-chart-status {
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.8;
}

.gnws-chart-status.gnws-is-error {
  opacity: 1;
  color: #b32d2e;
}

.gnws-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.gnws-table th,
.gnws-table td {
  border-bottom: 1px solid #eee;
  padding: 8px 10px;
  text-align: left;
  font-size: 13px;
}

.gnws-table th {
  background: #fafafa;
}

/* Public dashboard – centriranje celotnega bloka */
.gnws-public-dashboard {
  max-width: 1100px;      /* po želji: 900–1200px */
  margin: 0 auto;         /* CENTER strani */
  padding: 0 16px;
}

/* Wrapper za graf */
.gnws-public-chart-wrap {
  display: flex;
  justify-content: center;  /* CENTER horizontalno */
  align-items: center;
}

/* Sam graf (canvas) */
.gnws-public-chart-wrap canvas {
  max-width: 100%;
}

.gnws-dashboard-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;   /* center gumbi in selecti */
  gap: 8px 12px;
  margin-bottom: 16px;
}
