/**
 * Gaddi Store Locator - Frontend styles.
 *
 * Design token definiti come variabili locali al .gsl-locator
 * in modo da non inquinare il resto del tema.
 */

/* === VARIABILI === */
.gsl-locator {
	--gsl-primary:       var( --ast-global-color-0, #2c5e63 );
	--gsl-primary-dark:  #233f3c;
	--gsl-lime:          #b6dd4c;
	--gsl-ink:           var( --ast-global-color-3, #333333 );
	--gsl-muted:         #748080;
	--gsl-on-dark:       rgba( 255, 255, 255, 0.92 );
	--gsl-on-dark-soft:  rgba( 255, 255, 255, 0.72 );
	--gsl-radius-lg:     34px;
	--gsl-radius:        22px;
	--gsl-radius-sm:     14px;
	--gsl-shadow:        0 12px 36px rgba( 28, 59, 43, 0.12 );
	--gsl-shadow-sm:     0 4px 16px rgba( 28, 59, 43, 0.08 );

	color:       var( --gsl-ink );
	font-family: inherit;
	font-size:   inherit;
	line-height: inherit;
	margin: 1.5rem 0;
	container-type: inline-size;
}

/* === DROPDOWN SEDI === */
.gsl-dropdown {
	position: relative;
	width: 100%;
	margin-bottom: 20px;
	z-index: 10;
}

.gsl-dropdown-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 12px 18px;
	border: 1.5px solid var( --gsl-primary );
	border-radius: 999px;
	background: #fff;
	color: var( --gsl-primary );
	font-size: 0.95em;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: box-shadow 0.18s, border-color 0.18s;
}

.gsl-dropdown-trigger:hover {
	box-shadow: 0 2px 8px rgba( 44, 94, 99, 0.10 );
}

.gsl-dropdown-trigger[aria-expanded="true"] {
	border-radius: 22px 22px 0 0;
	border-bottom-color: transparent;
}

.gsl-dropdown-trigger[aria-expanded="true"] .gsl-dropdown-chevron {
	transform: rotate( 180deg );
}

.gsl-dropdown-label {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.gsl-dropdown-chevron {
	display: flex;
	flex-shrink: 0;
	margin-left: 12px;
	transition: transform 0.2s ease;
	color: var( --gsl-primary );
}

.gsl-dropdown-list {
	position: absolute;
	inset: 100% 0 auto 0;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: #fff;
	border: 1.5px solid var( --gsl-primary );
	border-top: none;
	border-radius: 0 0 22px 22px;
	box-shadow: var( --gsl-shadow-sm );
	scrollbar-width: thin;
	scrollbar-color: var( --gsl-primary ) transparent;
	opacity: 0;
	transform: translateY( -6px );
	pointer-events: none;
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.gsl-dropdown.is-open .gsl-dropdown-list {
	opacity: 1;
	transform: translateY( 0 );
	pointer-events: auto;
}

.gsl-dropdown-item {
	padding: 10px 14px;
	border-radius: 12px;
	cursor: pointer;
	font-size: 0.92em;
	font-weight: 500;
	color: var( --gsl-ink );
	transition: background-color 0.15s, color 0.15s;
}

.gsl-dropdown-item:hover,
.gsl-dropdown-item.is-highlighted {
	background: rgba( 44, 94, 99, 0.08 );
	color: var( --gsl-primary );
}

.gsl-dropdown-item.is-selected {
	background: var( --gsl-primary );
	color: #fff;
}

.gsl-dropdown-item.is-selected:hover {
	background: var( --gsl-primary-dark );
}

.gsl-dropdown-trigger:focus-visible,
.gsl-dropdown-list:focus-visible {
	outline: 2px solid var( --gsl-primary );
	outline-offset: 2px;
}

/* === LAYOUT: mobile === */
.gsl-layout {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.gsl-col-left {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.gsl-map-wrap { width: 100%; }

.gsl-map {
	width: 100%;
	min-height: 380px;
	height: 55vw;
	max-height: 500px;
	border-radius: var( --gsl-radius-lg );
	overflow: hidden;
	background: #dde8e4;
}

/* === PANNELLO INFO === */
.gsl-info {
	display: flex;
	flex-direction: column;
}

/* === CONTACT CARD === */
.gsl-contact-card {
	background: linear-gradient( 150deg, var( --gsl-primary ) 0%, var( --gsl-primary-dark ) 100% );
	color: #fff;
	border-radius: var( --gsl-radius-lg );
	padding: 38px 34px;
	box-shadow: var( --gsl-shadow );
	position: relative;
	overflow: hidden;
}

/* Logo decorativo in basso a destra della contact card */
.gsl-molecule {
    position: absolute;
    width: 520px;
    height: auto;
    opacity: 0.18;
    pointer-events: none;
    display: block;
    top: 65px;
    left: 135px;
}

.gsl-molecule img {
	width: 100%;
	height: auto;
	display: block;
}

.gsl-sede-nome {
	margin: 0 0 22px;
	font-size: 1.25rem;
	font-weight: 700;
	color: #fff;
	position: relative;
	z-index: 2;
}

/* Righe contatto */
.gsl-info-line {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin-bottom: 18px;
	position: relative;
	z-index: 2;
}

.gsl-info-line:last-of-type { margin-bottom: 0; }

.gsl-info-ico {
	width: 42px;
	height: 42px;
	border-radius: 12px;
	background: rgba( 255, 255, 255, 0.12 );
	display: grid;
	place-items: center;
	color: var( --gsl-lime );
	flex-shrink: 0;
}

.gsl-info-text {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.gsl-info-label {
	font-weight: 600;
	font-size: 0.78rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var( --gsl-lime );
}

.gsl-info-text .gsl-text,
.gsl-info-text a {
	color: var( --gsl-on-dark );
	font-size: 0.96rem;
	text-decoration: none;
	line-height: 1.4;
}

.gsl-info-text a:hover,
.gsl-info-text a:focus-visible {
	text-decoration: underline;
}

/* === HOURS CARD === */
.gsl-hours-card {
	background: #fff;
	border-radius: var( --gsl-radius );
	box-shadow: var( --gsl-shadow-sm );
	border: none;
	padding: 30px 32px;
	margin-top: 26px;
}

.gsl-hours-card h4,
.gsl-sede-orari h4 {
	margin: 0 0 16px;
	font-size: 1.1rem;
	font-weight: 700;
	color: var( --gsl-primary );
}

/* === ORARI TABLE === */
.gsl-orari-table {
	width: 100%;
	border-collapse: collapse; /* override Astra table { border-collapse: separate } */
	border-spacing: 0;
	border:none
}

.gsl-orari-table tbody tr {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 0;
	border-bottom:1px solid #e2e8d4;
}

.gsl-orari-table tbody tr:last-child th,
.gsl-orari-table tbody tr:last-child td {
	border-bottom: none;
}

.gsl-orari-table th,
.gsl-orari-table td {
	display: block;
	border: none;
	padding: 10px 0;
	font-size: 0.95rem;
	background: none;
}

.gsl-orari-table th {
	font-weight: 600;
	color: var( --gsl-ink );
	text-align: left;
}

.gsl-orari-table td {
	color: var( --gsl-muted );
	text-align: right;
}

.gsl-chiuso { color: #b65a4a; font-weight: 600; }
.gsl-vuoto  { color: #aaa; }

/* === AZIONI === */
.gsl-sede-azioni {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 20px;
}

.gsl-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 26px;
	border-radius: 999px;
	font-size: 0.9em;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	border: 2px solid transparent;
	transition: opacity 0.18s, background-color 0.18s, color 0.18s;
	text-transform: none;
	letter-spacing: normal;
}

.gsl-btn:focus-visible {
	outline: 2px solid var( --gsl-primary );
	outline-offset: 2px;
}

.gsl-btn-directions {
	background: var( --gsl-primary );
	color: #fff;
	border-color: var( --gsl-primary );
}

.gsl-btn-directions:hover { opacity: 0.88; }


@media screen and (max-width:667px){
.gsl-btn {
    width: 100%;
}}

.gsl-btn-nearest {
	background: transparent;
	color: var( --gsl-primary );
	border-color: var( --gsl-primary );
}

.gsl-btn-nearest:hover {
	background: var( --gsl-primary );
	color: #fff;
}

.gsl-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* === EMPTY STATE === */
.gsl-empty {
	padding: 24px;
	text-align: center;
	background: #f5f5f5;
	border-radius: var( --gsl-radius );
	color: var( --gsl-muted );
}

/* === DESKTOP (>= 992px): grid 1.15fr / 0.85fr === */
@media ( min-width: 992px ) {
	.gsl-layout {
		display: grid;
		grid-template-columns: 1.15fr 0.85fr;
		gap: 48px;
		align-items: stretch;
	}

	.gsl-col-left {
		grid-column: 1;
		display: flex;
		flex-direction: column;
		gap: 20px;
	}

	.gsl-dropdown {
		width: 100%;
		margin-bottom: 0;
	}

	.gsl-map-wrap {
		width: auto;
		flex: 1 1 auto;
		min-height: 0;
	}

	.gsl-map {
		height: 100%;
		min-height: 500px;
		max-height: unset;
	}
}
