/* =========================
	Global & Theme
========================= */
:root {
	--primary: #3a6ea5;
	--primary-hover: #2c567f;
	--card-bg: #a4a4a4;
	--bg: #8b8c8c;
	--text: #111;
	--white: #fff;
	--radius: 6px;
	--accent-bg: #d6d2c4;
	--shadow-sm: 0 2px 5px rgba(0,0,0,0.1);
	--shadow-md: 0 2px 6px rgba(0,0,0,0.12);
	--shadow-inset: 0 0 2px rgba(0,0,0,0.5);
}

* {
	box-sizing: border-box;
}

body {
	font-family: system-ui, Arial, sans-serif;
	margin: 0 auto;
	padding: 1rem;
	background: var(--bg);
	color: var(--text);
	max-width: 1200px;
	line-height: 1.5;
}

/* Utility */
.sr-only {
	position: absolute;
	left: -9999px;
}

/* =========================
	Header
========================= */
.site-header {
	text-align: center;
	margin-bottom: 2rem;
}

.site-header h1 {
	margin-bottom: 1rem;
}

.avatar img {
	max-width: 120px;
	border-radius: 50%;
	box-shadow: var(--shadow-sm);
}

/* Social links */
.social-links ul {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 1.5rem;
	list-style: none;
	padding: 0;
	margin: 1rem 0 0;
}


.social-links .nav-separator {
	flex-basis: 100%;
	height: 1px;
	background: rgba(0, 0, 0, 0.25);
	margin: 0.25rem 0;
	list-style: none;
}

.social-links a {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	text-decoration: none;
	color: inherit;
	font-weight: 600;
	transition: color 0.2s ease;
}

.social-links a:hover {
	color: var(--primary);
}

/* =========================
	Instructions & Counter
========================= */
#bottle-count {
	text-align: center;
	font-weight: bold;
	font-size: 1.8rem;
	margin-bottom: 1.5rem;
}
.instructions-accordion {
    margin: 2rem auto;
    max-width: 800px;
    background: var(--accent-bg);
    border: 2px solid #666;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden; /* Keeps the stripe inside */
    position: relative;
}

/* Re-using your blue accent stripe */
.instructions-accordion::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: var(--primary);
    z-index: 1;
}

summary {
    padding: 1rem;
    cursor: pointer;
    list-style: none; /* Removes default arrow in most browsers */
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
}

summary::-webkit-details-marker {
    display: none; /* Removes default arrow in Safari */
}

summary h2 {
    margin: 0;
    display: inline-block;
}

summary h2 small {
    font-size: 0.9rem;
    font-weight: normal;
    color: var(--primary);
    margin-left: 10px;
}

.instructions-content {
    padding: 0 1.5rem 1.5rem 2rem; /* Left padding extra for the stripe */
    text-align: center;
}

.path-list {
    text-align: left;
    margin: 1rem auto;
    display: inline-block; /* Centers the block but keeps text left-aligned */
    line-height: 1.8;
}

/* Optional: Slight highlight when open */
details[open] summary {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

/* =========================
	Search & Filters
========================= */
.search-section {
	text-align: center;
	margin: 1rem 0;
}

#search-bar {
	width: min(90%, 400px);
	padding: 0.6rem;
	font-size: 1rem;
	border-radius: var(--radius);
	border: 1px solid #ccc;
}

.filters-container {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1rem;
	margin-bottom: 1rem;
	align-items: center;
}

.filter-group {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

@media (min-width: 600px) {
	.filter-group {
		flex-direction: row;
		align-items: center;
		gap: 0.3rem;
	}
}

.filters-container select {
	padding: 0.4rem 0.6rem;
	font-size: 1rem;
	border-radius: var(--radius);
	border: 1px solid #bbb;
}

/* =========================
	Bottle Grid & Cards
========================= */
#bottle-container {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.5rem;
}

/* Card */
.bottle-card {
	background: var(--card-bg);
	border: 1px solid #232323;
	border-radius: var(--radius);
	padding: 1rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	box-shadow: var(--shadow-sm);
	height: 100%; /* Stretch cards to fill grid cell */
}

.bottle-card img {
	width: 100%;
	max-width: 320px;
	border-radius: var(--radius);
	object-fit: contain;
	margin-bottom: 1rem;
	box-shadow: 0 0 5px rgba(0,0,0,0.15);
}

/* Info section */
.bottle-info {
	display: flex;
	flex-direction: column;
	text-align: center;
	flex-grow: 1; /* Allows info section to expand and push footer down */
	width: 100%;
}

.bottle-title {
	font-size: 1.3rem;
	margin: 0 0 0.5rem;
}

/* Reserve space for description + download count */
.bottle-desc {
    min-height: 4.5rem;
    margin: 0.3rem 0 0.3rem;
}

.download-count {
    font-weight: 600;
    margin-bottom: 0.8rem;
}

/* Genres */
.bottle-genres {
	font-weight: bold;
	color: var(--white);
	background: #444;
	padding: 0.2rem 0.6rem;
	border-radius: 12px;
	white-space: nowrap;
	align-self: center;
	margin-bottom: 0.8rem;
	box-shadow: var(--shadow-inset);
}

/* Requirements badge */
.bottle-reqs {
	font-size: 0.85rem;
	font-weight: 600;
	color: #222;
	background: #f7e6b5;
	padding: 0.2rem 0.6rem;
	border-radius: 12px;
	white-space: nowrap;
	align-self: center;
	margin-bottom: 0.5rem;
	box-shadow: var(--shadow-inset);
}

/* Card Footer */
.bottle-footer {
	margin-top: auto; /* Push buttons to the bottom */
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	width: 100%;
}

/* Buttons */
.bottle-buttons {
	display: flex;
	justify-content: space-between;
	gap: 0.5rem;
}

.details-link,
.download-link {
	flex: 1;
	padding: 0.4rem 0.9rem;
	border-radius: var(--radius);
	font-weight: 600;
	text-decoration: none;
	text-align: center;
	background: var(--primary);
	color: var(--white);
	transition: background 0.2s ease, transform 0.1s ease;
}

.details-link:hover,
.download-link:hover {
	background: var(--primary-hover);
	transform: translateY(-1px);
}

.details-link:focus,
.download-link:focus {
	outline: 2px solid #ffcc00;
	outline-offset: 2px;
}

/* =========================
   Commit Banner
========================= */
.bottle-commit-banner {
    margin-top: 0.8rem;
    padding: 0.5rem 0.7rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--radius);
    font-size: 0.8rem;
    color: #333;
    font-style: italic;
    box-shadow: var(--shadow-inset);
    border-left: 4px solid var(--primary);
    
    /* Truncate long messages */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    width: 100%;
}