/* 관리자 page. The tables build on the board styles in about.css. */

.admin {
	max-width: 990px;
	min-height: 50vh;
	margin-right: auto;
	margin-left: auto;
	padding-right: 15px;
	padding-left: 15px;
}

.admin-card {
	display: grid;
	gap: 14px;
	margin-bottom: 28px;
	padding: 24px;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
	background: #fafafa;
}

.admin-card h3 {
	color: #222;
	font-size: 18px;
	font-weight: 600;
	line-height: 26px;
}

.admin-card label,
.admin-field {
	display: grid;
	gap: 6px;
	color: #333;
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
}

/* 16px stops phones from zooming in when a field is tapped. */
.admin-card input:not([type='file']),
.admin-card textarea {
	width: 100%;
	padding: 9px 10px;
	border: 1px solid #d2d2d2;
	border-radius: 3px;
	background: #fff;
	color: #222;
	font-family: inherit;
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
}

.admin-card textarea {
	resize: vertical;
}

.admin-card input:focus,
.admin-card textarea:focus {
	border-color: #1d69a9;
	outline: 1px solid #1d69a9;
}

.admin-columns {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.admin-login {
	max-width: 380px;
	margin: 24px auto 0;
}

.sub-content .admin-hint {
	color: #666;
	font-size: 13px;
	line-height: 20px;
}

.sub-content .admin-error {
	color: #c62f3b;
	font-size: 14px;
	line-height: 22px;
}

.sub-content .admin-notice {
	margin-top: 14px;
	padding: 9px 14px;
	border-radius: 3px;
	background: #e4f0fb;
	color: #123d63;
	font-size: 14px;
	line-height: 22px;
}

.admin-actions {
	display: flex;
	gap: 8px;
}

.admin-button {
	height: 40px;
	padding: 0 20px;
	border: 1px solid #1d69a9;
	border-radius: 3px;
	background: #1d69a9;
	color: #fff;
	font-size: 15px;
	font-weight: 500;
}

.admin-button--plain {
	border-color: #d2d2d2;
	background: #fff;
	color: #333;
}

.admin-button:disabled {
	opacity: 0.6;
	cursor: default;
}

.admin-small {
	flex: none;
	height: 30px;
	padding: 0 10px;
	border: 1px solid #d2d2d2;
	border-radius: 3px;
	background: #fff;
	color: #333;
	font-size: 13px;
}

.admin-small--danger {
	border-color: #eab8bd;
	color: #c62f3b;
}

.admin-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	border-bottom: 1px solid #d9dbe1;
}

.admin-tabs {
	display: flex;
	gap: 4px;
}

.admin-tabs button {
	height: 44px;
	margin-bottom: -1px;
	padding: 0 16px;
	border-bottom: 3px solid transparent;
	color: #666;
	font-size: 16px;
	font-weight: 500;
	white-space: nowrap;
}

.admin-tabs .is-active {
	border-bottom-color: #1d69a9;
	color: #1d69a9;
	font-weight: 700;
}

.admin-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 40px;
	margin: 26px 0 16px;
}

.sub-content .admin-heading h2 {
	font-size: 22px;
	font-weight: 600;
	line-height: 32px;
}

.admin-heading--blog {
	margin-top: 56px;
}

.admin-table {
	margin-top: 0;
}

.admin-row-actions {
	width: 124px;
}

.admin-row-buttons {
	display: flex;
	justify-content: center;
	gap: 4px;
}

.admin-badge {
	display: inline-block;
	margin-right: 6px;
	padding: 0 6px;
	border-radius: 3px;
	background: #1d69a9;
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	line-height: 20px;
}

.admin-photos {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.admin-photos li {
	position: relative;
	width: 96px;
	height: 96px;
}

.admin-photos img {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 3px;
	object-fit: cover;
}

.admin-photo-remove {
	position: absolute;
	top: 3px;
	right: 3px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.65);
	color: #fff;
	font-size: 16px;
	line-height: 24px;
}

@media (max-width: 1020px) {
	.admin {
		padding-bottom: 40px;
	}
}

@media (max-width: 480px) {
	.admin-card {
		padding: 16px;
	}

	.admin-columns {
		grid-template-columns: minmax(0, 1fr);
	}

	/* On the narrowest phones, the logout button moves above the tabs. */
	.admin-bar {
		flex-wrap: wrap-reverse;
		gap: 4px 8px;
	}

	.admin-bar .admin-small {
		margin-left: auto;
	}

	.admin-tabs {
		gap: 0;
	}

	.admin-tabs button {
		padding: 0 8px;
		font-size: 14px;
	}

	/* The stacked rows from about.css, without the number column. */
	.admin-table {
		margin-top: 0;
	}

	.admin-table tr {
		grid-template-columns: 1fr auto;
		gap: 4px 8px;
		padding-left: 10px;
	}

	.admin-table .board-title {
		grid-column: 1 / 3;
	}

	.admin-table .board-date {
		grid-column: 1;
	}

	.admin-table .board-views,
	.admin-table .board-preacher {
		grid-column: 2;
		grid-row: 2;
	}

	.admin-table .admin-row-actions {
		grid-column: 1 / 3;
		width: auto;
	}

	.admin-table .board-message {
		grid-column: 1 / 3;
	}

	.admin-row-buttons {
		justify-content: flex-start;
	}
}
