/**
 * MOD Stock Market Widgets frontend styles.
 * Purposefully compact: Elementor Style controls override these defaults.
 */
.mod-stock-widget,
.mod-stock-widget * { box-sizing: border-box; }
.mod-stock-widget {
	--mod-stock-text: #111827;
	--mod-stock-muted: #6b7280;
	--mod-stock-positive: #16a34a;
	--mod-stock-negative: #dc2626;
	--mod-stock-divider: #e5e7eb;
	color: var(--mod-stock-text);
	font: inherit;
}
.mod-stock__symbol { font-weight: 700; letter-spacing: .01em; }
.mod-stock__name { color: var(--mod-stock-muted); font-size: .8125em; line-height: 1.35; }
.mod-stock__price { color: var(--mod-stock-text); font-size: 1.55em; font-weight: 750; line-height: 1.1; letter-spacing: -.02em; }
.mod-stock__change { font-size: .875em; font-weight: 700; white-space: nowrap; }
.mod-stock__change.is-positive,
.mod-stock__badge.is-positive { color: var(--mod-stock-positive); }
.mod-stock__change.is-negative,
.mod-stock__badge.is-negative { color: var(--mod-stock-negative); }
.mod-stock__change.is-neutral,
.mod-stock__badge.is-neutral { color: var(--mod-stock-muted); }
.mod-stock-widget--error { display: grid; gap: 6px; border: 1px solid #fecaca; border-radius: 12px; padding: 16px; color: #991b1b; background: #fef2f2; }
.mod-stock-quote { display: grid; gap: 18px; min-width: 0; }
.mod-stock-quote__topline,
.mod-stock-quote__price-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.mod-stock-quote__price-row { align-items: baseline; }
.mod-stock__badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid currentColor; border-radius: 999px; font-size: .75em; font-weight: 700; line-height: 1; }
.mod-stock-quote__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; padding-top: 14px; border-top: 1px solid var(--mod-stock-divider); }
.mod-stock-detail { display: grid; min-width: 0; gap: 4px; text-align: left; align-content: start; }
.mod-stock-detail__label { color: var(--mod-stock-muted); font-size: .75em; }
.mod-stock-detail__value { font-size: .925em; overflow-wrap: anywhere; }
.mod-stock__updated { color: var(--mod-stock-muted); font-size: .75em; }
.mod-stock-quote__updated-divider { width: 100%; margin: 0; border: 0; border-top: 1px solid var(--mod-stock-divider); }
.mod-stock-quote--compact { display: grid; gap: 12px; }
.mod-stock-quote--compact .mod-stock__badge { display: none; }
.mod-stock-quote--hero .mod-stock__price { font-size: clamp(2.5rem, 8vw, 5rem); }
.mod-stock-quote--hero .mod-stock-quote__topline { align-items: center; }
.mod-stock-quote--inline { display: inline-flex; align-items: baseline; gap: 10px; padding: 0 !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }
.mod-stock-quote--inline .mod-stock-quote__topline { display: contents; }
.mod-stock-quote--inline .mod-stock-quote__price-row { display: contents; }
.mod-stock-quote--inline .mod-stock__name,
.mod-stock-quote--inline .mod-stock__badge,
.mod-stock-quote--inline .mod-stock-quote__stats,
.mod-stock-quote--inline .mod-stock__updated { display: none; }
/* MOD Stock Chart */
.mod-stock-chart { --mod-stock-chart-area-height: 340px; display: flex; flex-direction: column; gap: 14px; min-width: 0; min-height: 0; overflow: hidden; }
.mod-stock-chart__header { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 18px; }
.mod-stock-chart__identity,
.mod-stock-chart__headline { display: grid; gap: 4px; min-width: 0; }
.mod-stock-chart__headline { text-align: right; justify-items: end; }
.mod-stock-chart__divider,
.mod-stock-chart__footer-divider { flex: 0 0 auto; width: 100%; border: 0; border-top: 1px solid var(--mod-stock-divider); }
.mod-stock-chart__period-buttons { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.mod-stock-chart__period-button { appearance: none; display: inline-flex; align-items: center; justify-content: center; min-height: 30px; margin: 0; padding: 5px 10px; border: 1px solid #1e3a8a; border-radius: 5px; background: #fff; color: #1e3a8a; cursor: pointer; font: inherit; font-size: .8125em; font-weight: 700; line-height: 1; transition: color .16s ease, background-color .16s ease, border-color .16s ease, opacity .16s ease; }
.mod-stock-chart__period-button:hover:not(.is-active),
.mod-stock-chart__period-button:focus-visible:not(.is-active) { background: #4338ca; border-color: #4338ca; color: #fff; outline: 0; }
.mod-stock-chart__period-button.is-active { border-color: #312e81; background: #312e81; color: #fff; }
.mod-stock-chart__period-button:disabled { cursor: wait; opacity: .65; }
.mod-stock-chart__meta { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; min-height: 20px; }
.mod-stock-chart__footer { display: flex; flex: 0 0 auto; align-items: center; min-height: 20px; width: 100%; }
.mod-stock-chart__footer--align-flex-start { justify-content: flex-start; }
.mod-stock-chart__footer--align-flex-end { justify-content: flex-end; }
.mod-stock-chart__range { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border: 1px solid currentColor; border-radius: 999px; color: var(--mod-stock-muted); font-size: .75em; font-weight: 700; line-height: 1; }
.mod-stock-chart__canvas { position: relative; flex: 1 1 var(--mod-stock-chart-area-height); width: 100%; height: var(--mod-stock-chart-area-height); min-width: 0; min-height: 0; }
.mod-stock-chart__hover { position: absolute; z-index: 3; inset: 0; pointer-events: none; }
.mod-stock-chart__hover[hidden] { display: none; }
.mod-stock-chart__hover-line { position: absolute; display: block; width: 0; margin: 0; border-left: 1px solid #2563eb; transform: translateX(-0.5px); }
.mod-stock-chart__hover-tooltip { position: absolute; display: grid; gap: 4px; min-width: 112px; padding: 10px 12px; border: 1px solid #2563eb; border-radius: 8px; background: #fff; box-shadow: 0 8px 24px rgba(15, 23, 42, .12); white-space: nowrap; }
.mod-stock-chart__hover-tooltip-date { color: #1f2937; font-size: .875em; font-weight: 700; line-height: 1.3; }
.mod-stock-chart__hover-tooltip-price { color: #2563eb; font-size: 1em; font-weight: 700; line-height: 1.3; }
.mod-stock-chart__svg { display: block; width: 100%; height: 100%; overflow: visible; }
.mod-stock-chart__grid-line { stroke: #e5e7eb; stroke-width: 1; stroke-dasharray: 3 6; vector-effect: non-scaling-stroke; }
.mod-stock-chart__axis-label { fill: var(--mod-stock-muted); font-family: inherit; font-size: 12px; }
.mod-stock-chart__line { stroke: #2563eb; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.mod-stock-chart__area-start { stop-color: #2563eb; stop-opacity: .26; }
.mod-stock-chart__area-end { stop-color: #2563eb; stop-opacity: 0; }
.mod-stock-chart__point { fill: #fff; stroke: #2563eb; stroke-width: 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.mod-stock-chart__candle { stroke-width: 2; vector-effect: non-scaling-stroke; }
.mod-stock-chart__candle.is-positive { stroke: #16a34a; fill: #16a34a; }
.mod-stock-chart__candle.is-negative { stroke: #dc2626; fill: #dc2626; }
.mod-stock-chart__volume-bar { fill: #93c5fd; opacity: .75; }
.mod-stock-chart__status { color: var(--mod-stock-negative); font-size: .8125em; }
.mod-stock-chart__status[hidden] { display: none; }
.mod-stock-chart.is-loading .mod-stock-chart__canvas { opacity: .55; transition: opacity .16s ease; }
.mod-stock-chart .mod-stock__updated { display: inline-flex; align-items: center; }
@media (max-width: 767px) {
	.mod-stock-chart__header { gap: 12px; }
	.mod-stock-chart__headline { max-width: 50%; }
	.mod-stock-chart__period-buttons { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; scrollbar-width: thin; }
	.mod-stock-chart__period-button { flex: 0 0 auto; }
	.mod-stock-chart__meta { align-items: flex-start; flex-direction: column; gap: 8px; }
}

/* MOD Stock History */
.mod-stock-history { display: grid; gap: 14px; min-width: 0; }
.mod-stock-history__period-buttons { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.mod-stock-history__period-button { appearance: none; display: inline-flex; align-items: center; justify-content: center; min-height: 30px; margin: 0; padding: 5px 10px; border: 1px solid #1e3a8a; border-radius: 5px; background: #fff; color: #1e3a8a; cursor: pointer; font: inherit; font-size: .8125em; font-weight: 700; line-height: 1; transition: color .16s ease, background-color .16s ease, border-color .16s ease, opacity .16s ease; }
.mod-stock-history__period-button:hover:not(.is-active),
.mod-stock-history__period-button:focus-visible:not(.is-active) { background: #4338ca; border-color: #4338ca; color: #fff; outline: 0; }
.mod-stock-history__period-button.is-active { border-color: #312e81; background: #312e81; color: #fff; }
.mod-stock-history__period-button:disabled { cursor: wait; opacity: .65; }
.mod-stock-history__scroll { width: 100%; overflow-x: auto; border: 1px solid var(--mod-stock-divider); border-radius: 8px; background: #fff; -webkit-overflow-scrolling: touch; }
.mod-stock-history__table { width: 100%; min-width: 620px; border-collapse: collapse; border-spacing: 0; }
.mod-stock-history__table th,
.mod-stock-history__table td { padding: 14px 15px; border-bottom: 1px solid var(--mod-stock-divider); color: var(--mod-stock-text); text-align: left; vertical-align: middle; white-space: nowrap; }
.mod-stock-history__table thead th { font-size: .9em; font-weight: 750; }
.mod-stock-history__table tbody tr { transition: background-color .16s ease; }
.mod-stock-history__table tbody tr:hover td { background-color: #f8fafc; }
.mod-stock-history__table tbody tr:last-child td { border-bottom: 0; }
.mod-stock-history__table .mod-stock-history__column--date,
.mod-stock-history__table .mod-stock-history__cell--date { text-align: left; }
.mod-stock-history__row--empty td { color: var(--mod-stock-muted); text-align: center; }
.mod-stock-history__pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; min-height: 30px; }
.mod-stock-history__pagination[hidden] { display: none; }
.mod-stock-history__page-button { appearance: none; display: inline-flex; align-items: center; justify-content: center; min-width: 30px; min-height: 30px; margin: 0; padding: 5px 9px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #374151; cursor: pointer; font: inherit; font-size: .875em; line-height: 1; transition: color .16s ease, background-color .16s ease, border-color .16s ease, opacity .16s ease; }
.mod-stock-history__page-button:hover:not(:disabled),
.mod-stock-history__page-button:focus-visible:not(:disabled) { border-color: #9ca3af; background: #f9fafb; outline: 0; }
.mod-stock-history__page-button.is-active { border-color: #6b7280; background: #fff; color: #111827; font-weight: 700; }
.mod-stock-history__page-button:disabled { cursor: not-allowed; opacity: .4; }
.mod-stock-history__page-ellipsis { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; color: var(--mod-stock-muted); }
.mod-stock-history__status { color: var(--mod-stock-negative); font-size: .8125em; }
.mod-stock-history__status[hidden] { display: none; }
.mod-stock-history.is-loading .mod-stock-history__scroll { opacity: .55; transition: opacity .16s ease; }
@media (max-width: 767px) {
	.mod-stock-history__period-buttons { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; scrollbar-width: thin; }
	.mod-stock-history__period-button { flex: 0 0 auto; }
	.mod-stock-history__pagination { justify-content: center; }
}

/* Asset header for MOD Stock History (optional). */
.mod-stock-history__header { display: grid; gap: 4px; min-width: 0; }
