/*
    details.css - styles and animations for details summary
    Website iteration 1 : "¡Hola Mundo!" | v 0.1.5

	change log [day.month.year]:

	30.10.2026 - responsive toggle all details button; sticky; curor: pointer in summary and button; button padding background color; -wm 
	27.10.2026 - code clean-up; -wm
	25.10.2026 - opening and closing animation; initial character changes; responsive summary text; ol details window styling; -wm
	24.10.2026 - import all details and summary element, id and class styles; summary text styling; -wm
	20.10.2026 - init; styles to add + x widget to details open/close toggle text; -wm
	
*/


details {
	color: #626262;
	margin-top: 1em;
	white-space: normal;	
}

details > .details-panel {
	display: grid;
	grid-template-rows: 0fr;
	opacity: 0;
	transform: translateY(-0.5rem);
	transition:
	grid-template-rows 180ms ease-in,
	opacity 140ms ease-in,
	transform 180ms ease-in;
}

details[open] > .details-panel {
	grid-template-rows: 1fr;
	opacity: 1;
	transform: translateY(0);
	transition:
	grid-template-rows 600ms cubic-bezier(.2, .8, .2, 1),
	opacity 400ms ease-out,
	transform 600ms cubic-bezier(.2, .8, .2, 1);
}

.details-panel-inner {
	min-height: 0;
	overflow: hidden;
}

details[open] > summary::before,
#toggle-details-button[aria-expanded="true"] .summary-widget {
	transform: rotate(45deg);
	/*color: crimson;*/
}

details li {
	background-color: transparent !important;
	color: navy;
	font-size: 95%;
	font-family: Arial, sans-serif;
	text-align: left;
	font-weight: bold;
	padding: 0.5em;
	border-radius: none;
	border: none;
	box-shadow: none;
	margin: 1em;
	white-space: normal;
}

details li a:link, 
details li a:visited, 
details li a:hover, 
details li a:active {
	color: #191970;
	background-color: transparent;
	border: none;
	white-space: normal;	
}

details p {
	text-align: left;
	color: indigo;	
}

details ol {
	background-color: #f5f5f5;
	border-top: 0.5px solid #a9a9a9;
	border-right: 2px solid #a9a9a9;
	border-bottom: 2px solid #a9a9a9;	
	border-left: 0.5px solid #a9a9a9;	
	box-shadow: 1px 2px 5px #a9a9a9;
} 

details[open] > summary::before, 
details[open] > summary::after {
  transform: rotate(45deg);
}

summary {
	font-variant: small-caps;
	text-transform: capitalize;
	color: crimson;
	font-weight: bold;
	letter-spacing: 1.5px;
	list-style: none;
	cursor: pointer;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
	content: '  ⨕';
	margin-left: 0.5em;	
}

summary::before {
	content: "♥️";
	margin-right: 0.5em;  
}

summary::after,
summary::before {
  display: inline-block;
  transition: transform 180ms ease;
}

/* button: toggle all details open or closed */
#toggle-details-button {
	border: 1px solid rgb(207 207 225);
	border-radius: 35px;
	background: linear-gradient(
    	to top,
	    rgb(255,112,77,0.5) 0%,
    	rgb(245 245 245) 100%
  	);
	padding: 5px 11px;
	font-size: 100%;
	color: #555;
	margin: 1.5em 1.5em 0;
	font-weight: bold;
	box-shadow: 3px 3px 1px #777;
	position: sticky;
	top: 0;
	cursor: pointer;
}

#toggle-details-button[aria-expanded="true"] .summary-widget {
  transform: rotate(45deg);
}

/* link widget */
.details-panel-inner a::after {
	content: '\25B9';
	margin-left: 5px;
	color: crimson;
}

.narrative-details {
	background: transparent;
}

/* Keep the Open/Close All button's plus icon separate */
.summary-widget {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-right: 0.5em;
  vertical-align: -0.1em;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  transition: transform 180ms ease;
}

@media (prefers-reduced-motion: reduce) {
  details > .details-panel {
    transition: none;
  }

  summary::before,
  .summary-widget {
    transition: none;
  }
}


@media (max-width: 600px) and (orientation: portrait) {

	summary {
		letter-spacing: normal;
	}
	
	/* button: toggle all details open or closed */
	#toggle-details-button {
	border: 1px solid rgb(207 207 225);
	border-radius: 35px;
	background: linear-gradient(
    	to top,
	    rgb(207 207 225) 0%,
    	rgb(245 245 245) 100%
  	);
	padding: 5px;
	font-size: 60%;
	color: #555;
	margin: 1em 1em 0;
	font-weight: bold;
	box-shadow: 2px 2px 1px #777;
	}
}