/* =========================================================================
   golftrips-components.css
   Shared components for GolfTrips.com and the state golf sites
   (_templates and _admin). Loaded after responsivestyle.css in
   _templates/include/css.cfm.
   Change the ?v= date in css.cfm every time this file changes.
   ========================================================================= */


/* =========================================================================
   PAGER - results pagination
   "Showing 1-25 of 300" summary, Previous on the left, Next on the right.
   Buttons are .btn links (public pages) or small forms (admin pages that
   post their search fields), so both kinds of page look the same.

   <nav class="gt-pager" aria-label="Pagination">
     <p class="gt-pager__summary">Showing 1-25 of 300</p>
     <div class="gt-pager__actions">
       <a class="btn btn--secondary gt-pager__prev" href="...">&laquo; Previous</a>
       <a class="btn btn--secondary gt-pager__next" href="...">Next &raquo;</a>
     </div>
   </nav>
   ========================================================================= */

.gt-pager {
	clear: both;
	margin: 24px 0 8px;
	padding-top: 16px;
	border-top: 1px solid #e5e7eb;
}

.gt-pager__summary {
	margin: 0 0 12px;
	text-align: center;
	color: #667085;
	font-size: .875rem;
}

.gt-pager__actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
}

/* Next stays on the right even when there is no Previous button */
.gt-pager__next {
	margin-left: auto;
}

.gt-pager__actions form {
	margin: 0;
}

@media (max-width: 600px) {
	.gt-pager__actions .btn {
		white-space: nowrap;
	}
}


/* =========================================================================
   DETAILS - expand / collapse panel (native <details>, no script needed).
   Replaces the Shoelace <sl-details> expanders.

   <details class="gt-details">
     <summary class="gt-details__summary">Outing Information</summary>
     <div class="gt-details__body">
       <p>...</p>
     </div>
   </details>

   Add the open attribute (<details class="gt-details" open>) to start it
   expanded.
   ========================================================================= */

.gt-details {
	margin: 12px 0;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #fff;
}

.gt-details__summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	cursor: pointer;
	list-style: none;
	font-weight: 700;
	color: #163F6B;
}

/* Hide the browser's own triangle; a chevron is drawn on the right instead */
.gt-details__summary::-webkit-details-marker {
	display: none;
}

.gt-details__summary::after {
	content: "";
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	margin-top: -4px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform .15s ease;
}

.gt-details[open] > .gt-details__summary::after {
	margin-top: 4px;
	transform: rotate(-135deg);
}

.gt-details__summary:hover {
	background: #f6f8fb;
	border-radius: 8px;
}

.gt-details__summary:focus-visible {
	outline: 3px solid #2969b0;
	outline-offset: 2px;
	border-radius: 8px;
}

.gt-details__body {
	padding: 14px 16px;
	border-top: 1px solid #e5e7eb;
}

.gt-details__body > :last-child {
	margin-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
	.gt-details__summary::after {
		transition: none;
	}
}
