/** 
 * main.css
 * 
 * 1. General HTML tags
 * 2. Masthead area
 * 3. Main content and sidebar
 * 4. Footer
 * 5. Media queries for responsive layout
 * 6. Accessibility helpers
 * 
 */

/*********************************************************************
 * 1. General HTML tags
 *
 */

* {
	box-sizing: border-box; 
}

body {
	padding: 5%;
	max-width: 1600px; 
	margin: 0 auto; 
}

body, td, input[type=text], textarea {
	font-family: 'Quattrocento', serif;
	font-size: 105%; 
	line-height: 1.8em;
	color: #444; 
}

img {
	max-width: 100%; 
}

h2 {
	font-weight: normal;
}

h3 {
	border-top: 1px solid #eee; 
	padding-top: 1em;
	color: #777; 
}

a {
	color: #333;
	text-decoration: none;
	border-bottom: 1px solid #ccc; 
}
	a:hover,
	.nav a:hover {
		color: #000;
		border-color: #aaa; 
	}

blockquote {
	margin-left: 0;
	padding-left: 1.5em;
	padding-right: 2em; 
	border-left: 4px solid #ddd; 
	font-style: italic; 
	color: #777; 
}

pre, code {
	background: #eee; 
	border: 1px solid #ddd; 
}

pre {
	font-size: 14px; 
	line-height: 1.4em;
	padding: 1em;
	border-left: 4px solid #ddd; 
}

/*********************************************************************
 * 2. Masthead area
 *
 */

.topnav, .topnav li {
	list-style: none; 
	padding: 0;
	margin: 0;
}
	.topnav li {
		float: left; 
		margin-right: 1em;
		margin-bottom: 1em;
	}
	.topnav a {
		padding: 0.25em 0.5em;
		text-decoration: none; 
		display: block;
		background: #eee; 
		color: #333; 
		border: 1px solid #eee; 
	}
	.topnav a:hover {
		background: #ddd;
		border-color: #ddd; 
	}
	.topnav li.current a {
		background: #ccc; 
		border-color: #ccc; 
	}
	.topnav li.edit a {
		background: none; 
	}


form.search {
	float: right; 
	margin: 0;
	width: 30%; 
}
	form.search input {
		margin: 0;
		padding: 0.25em 0.5em;
		border: 1px solid #ccc; 
		width: 100%; 
	}

.breadcrumbs {
	clear: both; 
	padding-top: 1em; 
}
	.breadcrumbs span:after {
		content: ">";
		color: #999; 
		padding-left: 0.5em;
		padding-right: 0.25em; 
	}

/*********************************************************************
 * 3. Main content and sidebar
 *
 */

#main {
	border-top: 1px solid #eee; 
	padding-top: 1em; 
	margin-top: 1em; 
	clear: both; 
}

#content {
	width: 65%; 
	float: left;
	padding-bottom: 2em; 
}

#content.mods-content-wide {
    width: 100%;
    float: none;
}

#sidebar {
	width: 35%;
	padding-left: 5%; 
	float: left; 
	padding-bottom: 2em; 
}

.nav {
	margin-left: 0;
	padding-left: 0;
	list-style: none; 
}
	.nav .nav {
		padding-left: 1.5em;
		list-style: disc;
	}
	.nav li {
		margin: 1em 0;
	}

	.nav-tree li {
		margin-top: 0;
		margin-bottom: 0;
	}

	.nav a {
		font-weight: bold;
	}

	.nav-tree li a {
		color: #777; 
	}

	.nav .current > a {
		color: #333; 
	}

.align_left {
	/* for images placed in rich text editor */ 
	float: left;
	margin: 0 1em 0.5em 0; 
	position: relative;
	top: 0.5em;
	max-width: 50%; 
}

.align_right {
	/* for images placed in rich text editor */ 
	float: right;
	margin: 0 0 0.5em 1em;
	max-width: 50%; 
}

.align_center {
	/* for images placed in rich text editor */ 
	display: block;
	margin: 1em auto; 
	position: relative;
	top: 0.5em;
}

figure {
	display: table;
	width: 1px;
	margin: 1em 0;
}

figure img {
	display: table-row;
	margin-bottom: 0.5em;
}

figure figcaption {
	display: table-row;
	font-size: smaller;
	color: #777;
	line-height: 1.4em;
}

/*********************************************************************
 * 4. Footer
 *
 */

#footer {
	clear: both; 
	border-top: 1px solid #eee; 
	font-size: 80%; 
}

/*********************************************************************
 * 5. Media queries for responsive layout
 *
 */

@media only screen and (max-width: 767px) {
	/* mobile layout */ 

	body, td, textarea {
		font-size: 100%; 
	}
	#content, 
	#sidebar {
		float: none;
		width: 100%; 
		padding: 0; 
	}
	form.search {
		float: none; 
		width: 100%; 
	}
	#content {
		width: 100%; 
	}
	#sidebar {
		border-top: 1px solid #eee;
		padding-top: 1em; 
	}
	.align_left, .align_right, .align_center {
		display: block;
		float: none; 
		margin: 1em auto;
		max-width: 100%; 
	}

}

@media only screen and (min-width: 1200px) {
	/* extra-wide desktop layout */ 
	
	body, td, textarea {
		font-size: 115%; 
	}
}

/*********************************************************************
 * 6. Accessibility helpers
 *
 */

/* Hide visually, but remain approachable for screenreader */

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	white-space: nowrap;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	border: 0;
}

/* Show bypass link on hover */

.element-focusable:focus {
	clip: auto;
	overflow: visible;
	height: auto;
}

/* Sample styling for bypass link */

.bypass-to-main:focus {
	top: 0;
	left: 0;
	width: 100%;
	height: 40px;
	line-height: 40px;
	text-align: center;
	background: #333;
	color: #fff;
}

/* JJKT Sidebar Spotlight Spacing */
.sidebar-spotlight-item {
    margin-bottom: 1em;
}

.jjkt-ai-generated {
    display:inline-block;
    background:#222;
    color:#fff;
    padding:0.4em 0.8em;
    border-radius:4px;
    font-size:0.75em;
    font-weight:bold;
    letter-spacing:0.2px;
}

/* --- Project Mods: item page --- */
.project-header {
    display: flex;
    align-items: center;
    gap: 1em;
    flex-wrap: wrap;
    margin-bottom: 1em;
}

.status-badge {
    display: inline-block;
    padding: 0.35em 0.9em;
    border-radius: 999px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-purchased {
    background-color: #cfe2ff;
    color: #084298;
}

.status-installed {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-deferred {
    background-color: #e2e3e5;
    color: #41464b;
}

.project-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75em;
    margin-bottom: 1.5em;
}

.project-photos img {
    border-radius: 6px;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.project-info-table {
    width: 100%;
    max-width: 600px;
    border-collapse: collapse;
    margin-bottom: 1.5em;
}

.project-info-table th,
.project-info-table td {
    padding: 0.6em 0.8em;
    border-bottom: 1px solid #e5e5e5;
    text-align: left;
}

.project-info-table th {
    width: 40%;
    color: #555;
    font-weight: 600;
}

.project-total-row th,
.project-total-row td {
    font-weight: 700;
    border-top: 2px solid #333;
    border-bottom: 2px solid #333;
}

.project-description h3 {
    margin-bottom: 0.4em;
}

/* --- Project Mods: listing page --- */
.mods-list-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5em; /* Adds extra space above the table */
    font-size: 0.75em;
}

.mods-list-table th,
.mods-list-table td {
    padding: 1.2em 2em;
    border-bottom: 1px solid #e5e5e5;
    text-align: left;
}

.mods-list-table thead th {
    border-bottom: 2px solid #333;
    color: #555;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.mods-grand-total-row td {
    font-weight: 700;
    border-top: 2px solid #333;
    font-size: 1em;
}

.mods-filter-btn {
    padding: 0.5em 1em;
    border: 1px solid #ccc;
    border-radius: 20px;
    background: #fff;
    color: #333;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.15s ease;
}

.mods-filter-btn:hover {
    background: #f0f0f0;
}

.mods-filter-btn.active {
    background: #222;
    color: #fff;
    border-color: #222;
}

.defer-btn, .undefer-btn {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    font-size: 0.75em;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
}

.defer-btn {
    color: #842029;
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
}

.undefer-btn {
    color: #41464b;
    background-color: #e2e3e5;
    border: 1px solid #d3d6d8;
}

/* Completed Mods gallery - page body text wrapper spacing */
.page-body {
    margin-bottom: 1.5em;
}

/* Completed Mods gallery - grid container for all mod cards */
.mod-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5em;
    margin-top: 1.5em;
    margin-bottom: 2em;
}

/* Completed Mods gallery - individual mod card */
.gallery-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
}

/* Completed Mods gallery - clickable link wrapping each card's image and text */
.gallery-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    border-bottom: none;
}

/* Completed Mods gallery - cover photo thumbnail */
.gallery-card-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* Completed Mods gallery - placeholder shown when no cover photo exists */
.gallery-card-noimage {
    width: 100%;
    height: 200px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

/* Completed Mods gallery - text content padding wrapper */
.gallery-card-body {
    padding: 1.2em;
}

/* Completed Mods gallery - card title */
.gallery-card-title {
    margin: 0 0 0.5em 0;
    font-size: 1.15em;
    color: #222;
}

/* Completed Mods gallery - card summary text */
.gallery-card-summary {
    margin: 0;
    color: #555;
    font-size: 0.9em;
    line-height: 1.45;
}

/* Completed Mods gallery - "no galleries found" empty state message */
.gallery-empty-message {
    color: #666;
    font-style: italic;
}

/* Superuser action buttons wrapper on Completed Mods gallery cards (SUMMARIZE/NOTIFY) */
.mod-action-buttons {
    padding: 0 1.2em 1.2em 1.2em;
}

/* SUMMARIZE button - shown when proj_aisummary is empty or under 100 characters */
.btn-summarize {
    display: inline-block;
    padding: 0.5em 1em;
    background: #2c5f8a;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85em;
}

/* NOTIFY button - shown when proj_aisummary is 100+ characters and proj_notify_logged is empty */
.btn-notify {
    display: inline-block;
    padding: 0.5em 1em;
    background: #2c8a4f;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85em;
}