/**
 * common.css (Modernized)
 *
 * Based on OJS Default Stylesheet
 * Modernized by Trisna Wibawa (2025)
 * 
 * Replaces legacy fonts, colors, and readability improvements.
 * Compatible with Tailwind-style visual system.
 */

/* ===========================================================
   COMMON HTML ELEMENTS
   =========================================================== */

body {
	margin: 0;
	padding: 0;
	background-color: #FFFFFF; /* clean white background */
	color: #1f2937; /* neutral dark gray */
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
	line-height: 1.6;
	font-size: 16px;
	text-align: center;
}

div {
	text-align: left;
}

p {
	margin: 1em 0;
	color: #374151;
	font-size: 1rem;
}

table {
	border: 0;
	border-spacing: 0;
	font-size: 1em;
}

form {
	margin: 0;
}

a {
	color: #007aff;
	text-decoration: none;
	transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
	color: #005fcc;
	opacity: 0.8;
}

a.plain {
	text-decoration: none;
}

ul {
	margin: 0.25em 0 0.75em 0;
	padding: 0 0 0 2.5em;
}

tt {
	font-size: 1.25em;
}

label {
	color: #374151;
	font-weight: 500;
}

label.error {
	color: #dc2626;
	font-weight: 600;
}

input.textField, select.selectMenu, textarea.textArea, input.uploadField {
	background-color: #f9fafb;
	color: #111827;
	font-family: inherit;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	padding: 6px 10px;
	font-size: 1rem;
	transition: border-color 0.2s ease;
}

input.textField:focus, textarea.textArea:focus, select.selectMenu:focus {
	border-color: #007aff;
	outline: none;
}

input.button, button {
	padding: 8px 14px;
	background-color: #e5e7eb;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	cursor: pointer;
	font-size: 1rem;
	font-weight: 500;
	transition: all 0.2s ease;
}

input.button:hover, button:hover {
	background-color: #dbeafe;
	border-color: #007aff;
	color: #007aff;
}

input.defaultButton {
	background-color: #007aff;
	color: #fff;
	font-weight: 600;
	border: none;
}

input.defaultButton:hover {
	background-color: #005fcc;
}

/* ===========================================================
   MAIN LAYOUT
   =========================================================== */

#container {
	width: 100% !important;
	min-width: 730px !important;
	margin: 0 auto;
	text-align: center;
}

#header {
	width: 100%;
	text-align: center;
}

#headerTitle {
	text-align: center;
	margin: 0 auto;
	padding: 0;
	width: 100%;
}

#header h1 {
	margin: 0 auto;
	padding: 0;
	font-family: "Segoe UI Semibold", Roboto, sans-serif;
	font-weight: 600;
	font-size: 2rem;
	color: #111827;
}

#footer {
	width: 100%;
	min-height: 50px;
	position: static;
	clear: both;
	text-align: center;
	padding: 1em 0;
	background-color: #f9fafb;
	border-top: 1px solid #e5e7eb;
}

#footerContent {
	width: 100%;
	margin: 0 auto;
	padding-left: 10%;
	color: #6b7280;
	font-size: 0.9rem;
}

#main {
	padding: 1em 0 2em 0;
}

#main h2 {
	margin: 0em 1em 0.5em 0em;
	padding-top: 0.5em;
	font-family: "Segoe UI Semibold", Roboto, sans-serif;
	font-weight: 600;
	font-size: 1.75rem;
	color: #111827;
}

#main h3 {
	margin: 0.5em 1em 0.5em 0em;
	font-weight: 500;
	font-size: 1.4rem;
	color: #1f2937;
}

#navbar {
	margin-right: 0;
	padding-bottom: 0.5em;
	border-bottom: 2px dotted #e5e7eb;
}

#breadcrumb {
	padding-top: 1em;
	font-size: 0.85em;
	color: #6b7280;
}

#breadcrumb a {
	color: #007aff;
	text-decoration: none;
}

#breadcrumb a.current {
	font-weight: bold;
	color: #111827;
}

#content {
	margin: 0;
	padding: 1em 0;
	font-size: 0.9rem;
	border-top: 1px solid #e5e7eb;
	color: #374151;
	line-height: 1.7;
}

#content h3 {
	font-size: 1.5rem;
	font-weight: 600;
	margin-top: 1em;
}

#content h4 {
	font-size: 1.2rem;
	font-weight: 500;
	margin-top: 1em;
}

#content h5 {
	font-weight: bold;
	font-size: 1rem;
	margin-top: 0.75em;
}

/* ===========================================================
   SIDEBARS
   =========================================================== */

#sidebar div.block {
	font-size: 1em;
	padding-bottom: 1.5em;
}

#rightSidebar {
	float: right;
	width: 14%;
	padding: 1em 0;
	font-size: 0.75em;
	height: 100%;
	margin-right: 10%;
	margin-left: 2%;
}

#leftSidebar {
	float: left;
	width: 14%;
	padding: 1em 0;
	margin-left: 10%;
	font-size: 0.75em;
}

/* ✅ Responsive image fix for sidebars */
#rightSidebar img, #leftSidebar img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
	object-fit: contain;
}

/* ===========================================================
   TABLES
   =========================================================== */

table.info td {
	padding: 0.4em 0.5em;
}

table.listing td {
	padding: 0.25em 1em;
	border-bottom: 1px solid #e5e7eb;
}

table.listing tr.heading td,
table.listing td.heading,
table.info td.heading {
	font-size: 0.85em;
	text-transform: uppercase;
	font-weight: 600;
	color: #6b7280;
	padding: 0.75em 0.5em;
	border-bottom: 2px solid #d1d5db;
}

table.listing td.nodata {
	text-align: center;
	font-style: italic;
	color: #9ca3af;
}

/* ===========================================================
   FORMS & NOTIFICATIONS
   =========================================================== */

span.pkp_form_error {
	color: #dc2626;
	font-weight: 600;
	font-size: 1em;
}

span.pkp_form_success {
	color: #16a34a;
	font-weight: 600;
	font-size: 1em;
}

ul.pkp_form_error_list {
	color: #b91c1c;
}

div.warningMessage {
	background: #fef2f2 url(../templates/images/icons/icon_alert.gif) no-repeat 3px 40%;
	margin: 10px;
	padding: 8px 5px 8px 25px;
	border-left: 4px solid #dc2626;
	border-radius: 6px;
	color: #7f1d1d;
}

/* ===========================================================
   OTHER ELEMENTS
   =========================================================== */

ul.menu {
	margin: 0;
	padding: 0;
}

ul.menu li {
	margin: 0;
	padding: 0 1.5em 0 0;
	display: inline-block;
}

ul.menu li.current {
	font-weight: 600;
}

ul.menu a {
	font-size: 0.9em;
	text-transform: uppercase;
	text-decoration: none;
	color: #007aff;
}

ul.menu a:hover {
	color: #005fcc;
}

div.separator {
	width: 100%;
	margin: 1em 0 0.25em 0;
	border-bottom: 1px solid #e5e7eb;
	font-size: 0.5em;
	line-height: 25%;
}

#footer div.debugStats {
	font-size: 0.7em;
	color: #9ca3af;
}
