/* Βιβλίο Διαγωνισμάτων — frontend styles */

.exam-book {
	--eb-border: #d9dee5;
	--eb-head-bg: #1f3a5f;
	--eb-head-fg: #ffffff;
	--eb-accent: #1f3a5f;
	--eb-geniki: #2f7d3b;
	--eb-prosan: #b3541e;
	--eb-muted: #6b7280;
	--eb-radius: 8px;
	font-size: 16px;
	color: #1f2933;
	max-width: 100%;
}

.exam-book *,
.exam-book *::before,
.exam-book *::after {
	box-sizing: border-box;
}

/* ---- Toolbar ---- */
.eb-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.eb-weeknav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.eb-weekrange {
	font-weight: 700;
	font-size: 1.05em;
	padding: 0 6px;
}

.eb-filter {
	display: flex;
	align-items: center;
	gap: 8px;
}

.eb-filter label {
	font-weight: 600;
}

.eb-filter-select,
.eb-form select,
.eb-form input[type="text"] {
	font: inherit;
	padding: 8px 10px;
	border: 1px solid var(--eb-border);
	border-radius: 6px;
	background: #fff;
	max-width: 100%;
}

/* ---- Buttons ---- */
.eb-btn {
	display: inline-block;
	font: inherit;
	line-height: 1.2;
	padding: 8px 14px;
	border: 1px solid var(--eb-border);
	border-radius: 6px;
	background: #f4f6f9;
	color: var(--eb-accent);
	text-decoration: none;
	cursor: pointer;
	transition: background .15s ease;
}

.eb-btn:hover {
	background: #e8edf3;
}

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

.eb-btn-primary:hover {
	filter: brightness(1.08);
	background: var(--eb-accent);
}

.eb-btn-today {
	background: #fff;
}

/* ---- Weekly grid ---- */
.eb-grid {
	display: grid;
	grid-template-columns: repeat(var(--eb-cols, 5), minmax(0, 1fr));
	gap: 10px;
	align-items: stretch;
}

.eb-day {
	border: 1px solid var(--eb-border);
	border-radius: var(--eb-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	background: #fff;
}

.eb-day-head {
	background: var(--eb-head-bg);
	color: var(--eb-head-fg);
	font-weight: 700;
	text-align: center;
	padding: 8px 6px;
	font-size: .95em;
}

.eb-day-body {
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1 1 auto;
	min-height: 60px;
}

.eb-empty {
	color: var(--eb-muted);
	text-align: center;
	padding: 12px 0;
}

/* ---- Entry card ---- */
.eb-entry {
	border: 1px solid var(--eb-border);
	border-left: 4px solid var(--eb-muted);
	border-radius: 6px;
	padding: 8px 10px;
	background: #fbfcfe;
}

.eb-cat-geniki {
	border-left-color: var(--eb-geniki);
}

.eb-cat-prosanatolismou {
	border-left-color: var(--eb-prosan);
}

.eb-entry-section {
	font-weight: 700;
}

.eb-entry-subject {
	font-size: .95em;
}

.eb-entry-teacher {
	font-size: .85em;
	color: var(--eb-muted);
}

.eb-entry-notes {
	font-size: .8em;
	color: var(--eb-muted);
	font-style: italic;
}

/* Rule-exception entries stand out with a distinct background. */
.eb-entry.eb-override {
	background: #fff4e5;
	border-color: #e0a94a;
	box-shadow: inset 0 0 0 1px #f0c67e;
}

.eb-override-tag {
	display: inline-block;
	font-size: .68em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: #fff;
	background: #c9761b;
	border-radius: 3px;
	padding: 1px 5px;
	margin-bottom: 3px;
}

.eb-entry-actions {
	display: flex;
	gap: 6px;
	margin-top: 6px;
}

.eb-entry-actions button {
	font: inherit;
	font-size: .8em;
	padding: 3px 8px;
	border: 1px solid var(--eb-border);
	border-radius: 4px;
	background: #fff;
	color: var(--eb-accent);
	cursor: pointer;
}

.eb-entry-actions .eb-delete {
	color: #b3261e;
}

.eb-entry-actions button:hover {
	background: #eef1f5;
}

/* ---- Form ---- */
.eb-form {
	margin-top: 22px;
	padding: 16px;
	border: 1px solid var(--eb-border);
	border-radius: var(--eb-radius);
	background: #f8fafc;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px 16px;
}

.eb-form-title {
	grid-column: 1 / -1;
	margin: 0;
	font-size: 1.15em;
}

.eb-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.eb-field-wide {
	grid-column: 1 / -1;
}

.eb-field label {
	font-weight: 600;
	font-size: .9em;
}

.eb-form-actions {
	grid-column: 1 / -1;
	display: flex;
	gap: 10px;
}

/* ---- Messages ---- */
.eb-message {
	margin-top: 14px;
	min-height: 1.4em;
	font-weight: 600;
}

.eb-message-ok {
	color: var(--eb-geniki);
}

.eb-message-error {
	color: #b3261e;
}

/* ---- Login box ---- */
.eb-login-box {
	max-width: 400px;
	margin: 0 auto;
	padding: 24px;
	border: 1px solid var(--eb-border);
	border-radius: var(--eb-radius);
	background: #f8fafc;
}

.eb-login-title {
	margin: 0 0 8px;
	font-size: 1.2em;
	text-align: center;
}

.eb-login-intro {
	margin: 0 0 16px;
	color: var(--eb-muted);
	text-align: center;
}

#eb-loginform p {
	margin: 0 0 12px;
}

#eb-loginform label {
	display: block;
	font-weight: 600;
	font-size: .9em;
	margin-bottom: 4px;
}

#eb-loginform input[type="text"],
#eb-loginform input[type="password"] {
	width: 100%;
	font: inherit;
	padding: 9px 10px;
	border: 1px solid var(--eb-border);
	border-radius: 6px;
	background: #fff;
}

#eb-loginform .login-remember label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 400;
}

#eb-loginform .login-remember input {
	width: auto;
}

#eb-loginform .login-submit {
	margin-bottom: 0;
}

#eb-loginform #wp-submit {
	width: 100%;
	font: inherit;
	font-weight: 600;
	padding: 10px 14px;
	border: 1px solid var(--eb-accent);
	border-radius: 6px;
	background: var(--eb-accent);
	color: #fff;
	cursor: pointer;
}

#eb-loginform #wp-submit:hover {
	filter: brightness(1.08);
}

.eb-login-lost {
	margin: 14px 0 0;
	text-align: center;
	font-size: .9em;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
	.eb-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.eb-form {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 560px) {
	.eb-grid {
		grid-template-columns: 1fr;
	}
	.eb-toolbar {
		flex-direction: column;
		align-items: stretch;
	}
}

/* ---- Export panel ---- */
.eb-export {
	margin-top: 22px;
	padding: 16px;
	border: 1px solid var(--eb-border);
	border-radius: var(--eb-radius);
	background: #fff;
}

.eb-export-title {
	margin: 0 0 12px;
	font-size: 1.1em;
	color: var(--eb-accent);
}

.eb-export-range {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-bottom: 12px;
}

.eb-export-range label {
	font-weight: 600;
	font-size: .9em;
	display: flex;
	align-items: center;
	gap: 6px;
}

.eb-export-range input[type="date"] {
	font: inherit;
	padding: 7px 9px;
	border: 1px solid var(--eb-border);
	border-radius: 6px;
	background: #fff;
}

.eb-export-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.eb-export-hint {
	margin: 10px 0 0;
	font-size: .82em;
	color: var(--eb-muted);
}
