/*
	DC_NewsDisplay.css
*/

:root {
	--news-shadow-color: 220 3% 15%;
    --news-shadow-strength: 1%;
    --news-border-radius: 6px;
    --news-border-color: #e5e7eb;
    --news-border-color-dark: #6b7280;
;
    --news-bg-color: #FFF;
    --news-active-bg-color: 220 13% 91%;
}

.aoci:has(.aos-de-news) {
	overflow:visible;
}

.aos-de-news {
	container: news-ai / inline-size;
	width: 100%;
	display:flex;
	flex-direction: column;
	row-gap: 15px;

	> * {
		width:100%;
	}

	svg {
		flex-shrink: 0;
	}

	.aos-DFT > svg {
		margin-top:5px;
	}
}

@container news-ai (width < 800px) {
	.aos-de-news .aos-de-news-heading {
		flex-wrap: wrap;
 	}
}
.aos-de-news .aos-de-news-heading > div:first-of-type {
		flex-grow: 1;
}
.aos-de-news .aos-de-news-heading {
		position:relative;
		z-index: 2;
}
.aos-de-news .aos-de-news-heading .aos-de-news-tooltip-top.aos-PosA {
		position:absolute;
		right: 0;
		top: 20px;
}

.aos-de-news,
.aos-de-news .aos-de-news-timeframe-dd {
	position: relative;
	/*overflow: hidden;*/
}
.aos-de-news .aos-de-news-timeframe-dd,
.aos-de-news .aos-de-news-topics-dd {	
	flex-shrink: 0;		
}
.aos-de-news .aos-de-news-timeframe-dd,
.aos-de-news .aos-de-news-topics-dd,
.aos-de-news .aos-de-news-interests > * {	
	font-size: .9em;		
}

.aos-de-news .aos-de-news-timeframe-dd > div,
.aos-de-news .aos-de-news-topics-dd > div {
	cursor:pointer;	
	padding: 6px;	
	display: flex;
	align-items: center;
	gap:6px;
}

.aos-de-news .aos-de-news-timeframe-dd nav {
	padding: 5px;
	position:absolute; 
	top: calc(100% + 10px);
	left:0;
	z-index: 1;
	width:max-content;
	border: 1px solid var(--news-border-color);
	box-shadow: 0 3px 5px -2px hsl(var(--news-shadow-color)/calc(var(--news-shadow-strength) + 3%)),0 7px 14px -5px hsl(var(--news-shadow-color)/calc(var(--news-shadow-strength) + 5%));
	background-color: var(--news-bg-color);
}

.aos-de-news .aos-de-news-timeframe-dd > nav { 
	max-height: 500px;
	visibility: visible;
	opacity: 1;
	transition: all .35s ease-in-out;
	-webkit-transition: all .35s ease-in-out;
	-moz-transition: all .35s ease-in-out;
	overflow: hidden;
}
.aos-de-news .aos-de-news-timeframe-dd:not(.focus) > nav { 
	max-height:0;
	visibility: hidden;
}

.aos-de-news .aos-de-news-timeframe-dd nav,
.aos-de-news .aos-de-news-timeframe-dd nav span {
	border-radius: var(--news-border-radius);
}

.aos-de-news .aos-de-news-timeframe-dd nav span {
	cursor:pointer;
	width:100%;
	display:block;
	padding-inline: 10px 30px;
}

.aos-de-news .aos-de-news-timeframe-dd nav span.selected {	
	background-color: hsl(var(--news-active-bg-color));		
	background-image: url('data:image/svg+xml,<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6.36665 12L2.56665 8.2L3.51665 7.25L6.36665 10.1L12.4833 3.98334L13.4333 4.93334L6.36665 12Z" fill="%234B5563"/></svg>');
	background-position: calc(100% - 5px) center;
	background-repeat: no-repeat;
	padding-block: 3px;
}

/*.aos-de-news:has(.aos-de-news-topics-dd.focus) .aos-de-news-topics-selected,*/
.aos-de-news:has(.aos-de-news-topics-dd:not(.focus)) .aos-de-news-topics-list,
.aos-de-news:has(.aos-de-news-topics-dd:not(.focus)):has(.aos-de-news-topics-selected.empty) .aos-de-news-interests { 
	display:none;
}

.aos-de-news .aos-de-news-interests { 
	position: relative;
	width: 100%;
}
.aos-de-news .aos-de-news-interests .aos-de-news-topics-list { 
	position: absolute;
	z-index: 3;
	top: -10px;
}
.aos-de-news .aos-de-news-interests .aos-de-news-topics-list button { 
	align-self: flex-end;
}

.aos-de-news .aos-de-news-topics-list nav span {	
	cursor:pointer;	
	display: flex;
	flex-shrink: 0;
}
.aos-de-news .aos-de-news-topics-list nav span.selected {	
	order:-1;
}

.aos-de-news-topics-list form > div {
	display:flex;
	justify-content: stretch;
}

.aos-de-news .aos-de-news-timeframe-dd.focus > div svg:last-of-type,
.aos-de-news .aos-de-news-topics-dd.focus > div svg:last-of-type{
	transform: rotate(180deg);
}

/* My Interests */
.aos-de-news-topics-selected {
	display:flex;
	justify-content: space-between;
	align-items: center;
}

.aos-de-news-topics-selected > div:not(.aos-de-news-switch) {
	display:flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}
.aos-de-news-topics-selected nav {
	display:flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 5px;
}

.aos-de-news .aos-de-news-interests .aos-de-news-topics-selected nav span {
  flex-shrink: 0;  
  cursor:default;
}
.aos-de-news .aos-de-news-interests:not(:has(input:checked)) .aos-de-news-topics-selected nav span {
  opacity:.6;
  text-decoration: line-through !important;  
}

.aos-de-news-topics-selected input:checked + .aos-Slider {
  background-color: #22a573;
  top: 0; bottom:0; left:0; right:0;
}

.aos-de-news-topics-selected .aos-Switch {  
	flex-shrink: 0;  
  width: 40px;
  height: 20px;
}

.aos-de-news-topics-selected .aos-Slider::before {  
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
}

.aos-de-news div:has(>.aos-de-news-summary),
.aos-de-news .aos-de-news-summary {
	position: relative;	
}
.aos-de-news .aos-de-news-summary {
	display: block;	
	overflow: hidden;
}
.aos-de-news .aos-de-news-summary.scrollable {			
	overflow-y: auto;
	padding-right: .5rem;
	scrollbar-color: gray transparent;
	scrollbar-width: thin;
}

.aos-de-news .aos-de-news-summary:not(.scrollable)+svg,
.aos-de-news .aos-de-news-summary:not(.top)+svg {
	display:none;
}

.aos-de-news .aos-de-news-summary.scrollable.top+svg {
	position:absolute;
	bottom:0;
	right:-5px;
	z-index: 2;
	background-color: #FFF;	
}

.aos-de-news div:has(>.aos-de-news-summary.scrollable:not(.bottom))::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 30px;
    width: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0, rgba(255, 255, 255, 1) 50%);
    z-index: 1;
}
.aos-de-news div:has(>.aos-de-news-summary.scrollable:not(.top))::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 30px;
    width: 100%;
    background: linear-gradient(0deg, rgba(255, 255, 255, 0.2) 0, rgba(255, 255, 255, 1) 50%);
    z-index: 1;
}

.aos-de-news .aos-de-news-tooltip-top {
	position: relative;
}
.aos-de-news .aos-de-news-tooltip-top > span:nth-of-type(1) {
	flex-shrink: 0;
}
.aos-de-news .aos-de-news-tooltip-top > span:nth-of-type(2) {
	display:none;
	top:25px;
	right:-5px;
	width:max-content;
	max-width:250px;
	background-color:white;
	border-radius:4px;
	line-height:140%;
	box-shadow:0 0 10px rgba(0,0,0,.25)
}
.aos-de-news .aos-de-news-tooltip-top > span:nth-of-type(2)::after {
	content:'';
	position: absolute;
	top:-5px;
	right:7px;
	margin-top:-7px;
	border-width:7px;
	border-style: solid;
	border-color: transparent transparent white transparent;
}
.aos-de-news .aos-de-news-tooltip-top:hover > span:nth-of-type(2) {
	display:block;
	z-index: 1;
}