/* VANTAGE GLOBAL WIDGET CSS */
.v-wp-widget { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 13px; color: #3c434a; }
.v-wp-select { max-width: 100%; height: 28px !important; line-height: 1.2 !important; font-size: 11px !important; padding: 0 24px 0 8px !important; border-radius: 4px; border: 1px solid #8c8f94; background-color: #fff; vertical-align: middle; }
/* Core's focus ring on a <select> is a heavy blue box-shadow. A focus indicator has to stay — a keyboard user
   needs to see where they are — so this replaces it with the brand colour at one pixel rather than removing it. */
/* #wpbody-content in front so this outranks core's own `.wp-core-ui select:focus`, which is two classes and an
   element and otherwise wins. */
#wpbody-content .v-wp-select:focus,
#wpbody-content .v-wp-select:focus-visible {
	border-color: var(--vantage-brand-color, #4f46e5);
	box-shadow: 0 0 0 1px var(--vantage-brand-color, #4f46e5);
	outline: none;
}

.v-wp-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.v-wp-table th { background: #f8fafc; border-bottom: 1px solid #c3c4c7; padding: 8px; font-size: 11px; text-transform: uppercase; font-weight: 600; color: #646970; }
.v-wp-table td { border-bottom: 1px solid #f0f0f1; padding: 10px 8px; line-height: 1.4; vertical-align: middle; white-space: normal; word-wrap: break-word; font-size: 12px; }
.v-wp-table tfoot td { border-top: 2px solid #c3c4c7; font-weight: bold; background: #f8fafc; color: #1d2327; }
/* A widget with nothing to show keeps its controls — the range is how you ask it for a period that does have
   something — and loses the rest, so one sentence does not sit in 450px of empty chart and table. */
.v-wp-is-empty > *:not(.v-wp-controls):not(.v-wp-empty) { display: none !important; }
/* The download button goes with the table it downloads: offered on a collapsed widget it would hand over a
   file containing nothing but the column headings. */
.v-wp-is-empty .vantage-csv-button { display: none !important; }
.v-wp-empty { padding: 24px 12px 18px; text-align: center; font-size: 13px; line-height: 1.6; color: #646970; }

/* "Showing: 2026-01-01 – 2026-10-06 | Change", on its own row under the controls. flex-basis: 100% puts it
   there; being in the flow rather than absolutely positioned is what keeps it off whatever follows — a chart, a
   table or an insight — at every widget's own spacing. */
/* order puts it after the download button whatever order the two were added in — the button is attached on
   DOMContentLoaded and this line when the widget's own script runs, which is not a fixed sequence. */
.v-wp-range-display { order: 99; flex: 0 0 100%; margin: 2px 0 6px; font-size: 10px; color: #646970; white-space: nowrap; }
.v-wp-range-dates { font-weight: 600; color: #1d2327; }
.v-wp-range-change { background: none; border: 0; padding: 0; font-size: 10px; color: var(--vantage-brand-color, #2271b1); cursor: pointer; text-decoration: underline; }

/* The row above every widget table: what filters the data on the left, what takes the data away on the right.
   align-items: stretch so the download button is exactly as tall as the selects, whatever height core gives
   a <select> this year. */
.v-wp-controls { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; margin-bottom: 15px; }
.v-wp-controls > .vantage-csv-button { order: 50; margin-left: auto; }

/* Square, because its width is its height — it holds one icon and no label. align-self: stretch gives it the
   row's height, and vantageAttachCsvButtons() measures that and sets the matching width; the min-width here is
   what it looks like until that runs. No border and no background at rest — only the icon — so it does not read
   as a fourth filter; the rounded corner appears with the hover background behind it. The border stays in the
   box as transparent, so nothing shifts by a pixel when it arrives. */
.vantage-csv-button { display: inline-flex; align-items: center; justify-content: center; align-self: stretch; min-width: 28px; padding: 0; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #50575e; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.vantage-csv-button svg { width: 15px; height: 15px; display: block; }
.vantage-csv-button:hover, .vantage-csv-button:focus-visible { background: #6366f1; border-color: #6366f1; color: #fff; }

/* align-self: stretch lets a Filters button match the height of the selects beside it, whatever height
   WordPress gives a <select> this year — core sets a min-height on them, which beats a fixed height of ours. */
.v-range-wrap { position: relative; display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; align-self: stretch; }
.v-range-picker { display: none; position: absolute; top: calc(100% + 4px); right: 0; z-index: 999999; gap: 8px; align-items: center; background: #fff; padding: 12px; border-radius: 6px; border: 1px solid #c3c4c7; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); white-space: nowrap; }
.v-range-picker.active { display: flex; }
.v-range-picker input[type="date"] { font-size: 11px; padding: 2px 6px; min-height: 24px; border-radius: 3px; }
.v-range-picker button { background: var(--vantage-brand-color, #2271b1); color: #fff; border: none; padding: 4px 10px; border-radius: 3px; cursor: pointer; font-size: 11px; transition: opacity 0.2s; }
.v-range-picker button:hover { opacity: 0.85; }
.v-wp-widget a { color: var(--vantage-brand-color, #2271b1); text-decoration: none; font-weight: 500; }
.v-wp-widget a:hover { text-decoration: underline; }

/* Historical Trends (includes/views/widget-overview.php) */
.vw-container { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; margin: -12px; padding: 16px; background: #f8fafc; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; box-sizing: border-box; }
.vw-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.vw-title { font-size: 14px; font-weight: 600; color: #1e293b; margin: 0; }
.vw-select { background: #fff; padding: 4px 8px; border-radius: 4px; border: 1px solid #e2e8f0; font-size: 12px; outline: none; cursor: pointer; }
.vw-vitals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.vw-box { background: #fff; padding: 8px; border-radius: 4px; border: 1px solid #e2e8f0; text-align: center; }
.vw-label { font-size: 10px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; }
.vw-val { font-size: 14px; font-weight: 700; color: #1e293b; margin-top: 4px; }
.vw-val.blue { color: #2563eb; }
.vw-chart-wrap { position: relative; height: 280px; width: 100%; background: #fff; padding: 8px; border-radius: 4px; border: 1px solid #e2e8f0; box-sizing: border-box; }

/* Today's Pulse (includes/views/widget-today.php) */
.vwt-box { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #0f172a; padding: 4px; }
.vwt-label { font-size: 10px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.vwt-flex-end { display: flex; align-items: baseline; gap: 8px; }
.vwt-trend { font-size: 11px; font-weight: 600; cursor: help; }
.vwt-avg-text { font-size: 10px; color: #64748b; margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.vwt-tooltip { position: relative; cursor: help; border-bottom: 1px dotted #94a3b8; }
.vwt-tooltip .vwt-tooltip-text { visibility: hidden; width: 200px; background-color: #1e293b; color: #fff; text-align: center; border-radius: 4px; padding: 6px; position: absolute; z-index: 50; bottom: 125%; left: 0; font-size: 11px; font-weight: normal; }
.vwt-tooltip:hover .vwt-tooltip-text { visibility: visible; }
.vwt-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid #e2e8f0; position: relative; overflow: hidden; }
.vwt-z-10 { position: relative; z-index: 10; }

/* Monthly Pacing (includes/views/widget-month.php) */
.vwm-box { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #0f172a; padding: 4px; }
.vwm-label { font-size: 10px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.vwm-flex-end { display: flex; align-items: baseline; gap: 8px; }
.vwm-trend { font-size: 11px; font-weight: 600; cursor: help; }
.vwm-avg-text { font-size: 10px; color: #64748b; margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.vwm-tooltip { position: relative; cursor: help; border-bottom: 1px dotted #94a3b8; }
.vwm-tooltip .vwm-tooltip-text { visibility: hidden; width: 200px; background-color: #1e293b; color: #fff; text-align: center; border-radius: 4px; padding: 6px; position: absolute; z-index: 50; bottom: 125%; left: 0; font-size: 11px; font-weight: normal; }
.vwm-tooltip:hover .vwm-tooltip-text { visibility: visible; }
.vwm-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid #e2e8f0; position: relative; overflow: hidden; }
.vwm-z-10 { position: relative; z-index: 10; }

/* Annual Trajectory (includes/views/widget-year.php) */
.vwy-box { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #0f172a; padding: 4px; }
.vwy-label { font-size: 10px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.vwy-flex-end { display: flex; align-items: baseline; gap: 8px; }
.vwy-trend { font-size: 11px; font-weight: 600; cursor: help; }
.vwy-avg-text { font-size: 10px; color: #64748b; margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.vwy-tooltip { position: relative; cursor: help; border-bottom: 1px dotted #94a3b8; }
.vwy-tooltip .vwy-tooltip-text { visibility: hidden; width: 200px; background-color: #1e293b; color: #fff; text-align: center; border-radius: 4px; padding: 6px; position: absolute; z-index: 50; bottom: 125%; left: 0; font-size: 11px; font-weight: normal; }
.vwy-tooltip:hover .vwy-tooltip-text { visibility: visible; }
.vwy-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid #e2e8f0; position: relative; overflow: hidden; }
.vwy-z-10 { position: relative; z-index: 10; }

/* Daily Briefing (includes/premium/views/widget-daily-briefing.php) */
.v-briefing-wrap { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; display: flex; gap: 12px; align-items: flex-start; padding: 4px; }
.v-briefing-icon { width: 24px; height: 24px; flex-shrink: 0; margin-top: 2px; }
.v-briefing-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.v-briefing-text { font-size: 13px; color: #3c434a; line-height: 1.5; }
