/*
 * 会員管理システム用スタイル
 */

/* ========================================
   Newscrunchテーマの不要要素を非表示にする
======================================== */
body.mms-page .before-footer-ads {
	display: none !important;
}

/* テーマの select { height: 5em; } 指定を無効化して通常の高さにする */
body.mms-page select {
	height: auto !important;
	line-height: normal !important;
}


/* ========================================
   背景画像を強制的に消す（Newscrunchのタイル背景対策）
======================================== */
body.mms-page,
body.mms-page #page,
body.mms-page .site,
body.mms-page #content,
body.mms-page .site-content,
body.mms-page #wrapper,
body.mms-page #main,
body.mms-page .entry-content {
	background-image: none !important;
	background: #f5f7fa !important;
}

body.mms-page {
	background: #f5f7fa !important;
	background-image: none !important;
	background-color: #f5f7fa !important;
	margin: 0;
	padding: 0;
	font-family: 'Noto Sans JP', 'Hiragino Sans', sans-serif;
}

/* ヘッダーの重なりはJavaScript（functions.php）で動的に解消 */
body.mms-page #content.page-section-full {
	box-sizing: border-box !important;
	padding-bottom: 40px !important;
}

body.mms-page .mms-wrapper {
	margin: 0 auto !important;
}


/* ========================================
   会員システム専用レイアウト
======================================== */

.mms-page-wrapper {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.mms-header {
	background: #1a3a5c !important;
	color: #fff !important;
	height: 60px;
	display: flex;
	align-items: center;
	padding: 0 24px;
	position: sticky;
	top: 0;
	z-index: 9999;
}

.mms-header-inner {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.mms-logo a {
	color: #fff !important;
	text-decoration: none;
	font-size: 18px;
	font-weight: bold;
}

.mms-header-user {
	display: flex;
	align-items: center;
	gap: 16px;
	font-size: 14px;
	color: #fff !important;
}

.mms-header-user span {
	color: #fff !important;
}

/* WordPress管理者バーがダークモード等の影響で白背景・白文字になるのを防ぐ */
body.mms-page #wpadminbar,
body.mms-page #wpadminbar * {
	background-color: #1d2327 !important;
	color: #c3c4c7 !important;
}

body.mms-page #wpadminbar .ab-item,
body.mms-page #wpadminbar a.ab-item,
body.mms-page #wpadminbar .ab-label {
	color: #c3c4c7 !important;
}

.mms-logout-btn {
	color: #fff !important;
	background-color: transparent !important;
	border: 1px solid rgba(255, 255, 255, 0.5);
	padding: 4px 14px;
	border-radius: 4px;
	text-decoration: none;
	font-size: 13px;
}

.mms-logout-btn:hover {
	background: rgba(255, 255, 255, 0.2);
}

.mms-main {
	flex: 1;
	padding: 32px 24px;
	max-width: 1200px;
	margin: 0 auto;
	width: 100%;
	box-sizing: border-box;
}

.mms-footer {
	background: #1a3a5c;
	color: rgba(255, 255, 255, 0.6);
	text-align: center;
	padding: 16px;
	font-size: 13px;
}

.mms-wrapper {
	max-width: 640px;
	margin: 40px auto;
	padding: 40px;
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
	border: 1px solid rgba(0, 0, 0, 0.06);
	box-sizing: border-box;
}

.mms-wrapper:has(.mms-payment-table),
.mms-wrapper:has(.mms-receipt-table),
.mms-wrapper:has(.mms-nav) {
	max-width: 1200px;
}

.mms-title {
	font-size: 28px;
	font-weight: 800;
	color: #0f172a;
	margin-bottom: 24px;
	text-align: center;
	letter-spacing: -0.5px;
}

.mms-errors {
	background: #fdecea;
	border: 1px solid #f5c2c7;
	color: #b3261e;
	border-radius: 4px;
	padding: 15px 20px;
	margin-bottom: 20px;
}

.mms-errors ul {
	margin: 0;
	padding-left: 20px;
}

.mms-success {
	background: #e6f4ea;
	border: 1px solid #b7dfc1;
	color: #1e7e34;
	border-radius: 4px;
	padding: 15px 20px;
	margin-bottom: 20px;
}

.mms-success p {
	margin: 0;
	font-weight: 600;
}

.mms-message {
	border-radius: 4px;
	padding: 15px 20px;
	margin-bottom: 20px;
}

.mms-message p {
	margin: 0;
	font-weight: 600;
}

.mms-message-success {
	background: #e6f4ea;
	border: 1px solid #b7dfc1;
	color: #1e7e34;
}

.mms-message-error {
	background: #fdecea;
	border: 1px solid #f5c2c7;
	color: #b3261e;
}

.mms-message-info {
	background: #e8f0fe;
	border: 1px solid #adc1e6;
	color: #1a73e8;
}

.mms-login-links {
	margin-top: 20px;
	display: flex;
	justify-content: space-between;
	font-size: 14px;
}

.mms-login-links a {
	color: #2c3e50;
	text-decoration: underline;
	transition: color 0.2s ease;
}

.mms-login-links a:hover {
	color: #1a242f;
}


.mms-form-group {
	margin-bottom: 20px;
}

.mms-label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
}

.mms-required {
	color: #d63638;
	font-size: 12px;
	margin-left: 4px;
}

.mms-input,
.mms-select {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 16px;
	border: 1.5px solid #e2e8f0;
	border-radius: 8px;
	font-size: 15px;
	background-color: #f8fafc;
	color: #1e293b;
	transition: all 0.3s ease;
}

.mms-input:focus,
.mms-select:focus {
	border-color: #1a3a5c;
	background-color: #ffffff;
	box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.15);
	outline: none;
}

.mms-row {
	display: flex;
	gap: 20px;
}

.mms-row .mms-form-group {
	flex: 1;
}

.mms-actions {
	margin-top: 30px;
	text-align: center;
}

.mms-btn {
	display: inline-block;
	padding: 12px 32px;
	background: linear-gradient(135deg, #1a3a5c 0%, #2c537d 100%);
	color: #fff !important;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 2px 8px rgba(26, 58, 92, 0.2);
	text-decoration: none;
	white-space: nowrap;
}

.mms-btn:hover {
	background: linear-gradient(135deg, #2c537d 0%, #1a3a5c 100%);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(26, 58, 92, 0.35);
}

.mms-btn:active {
	transform: translateY(0);
	box-shadow: 0 2px 6px rgba(26, 58, 92, 0.2);
}

.mms-hint {
	font-size: 12px;
	color: #777;
	margin-top: 4px;
}

@media (max-width: 600px) {
	.mms-row {
		flex-direction: column;
		gap: 0;
	}
}

.mms-welcome {
	font-size: 16px;
	font-weight: 600;
	text-align: center;
	margin-bottom: 20px;
}

.mms-nav {
	margin-bottom: 30px;
}

.mms-nav-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 30px;
	padding: 0;
	list-style: none;
	border-bottom: 2px solid #e2e8f0;
}

.mms-nav-item {
	flex: 1;
	min-width: 120px;
}

.mms-nav-link {
	display: block;
	padding: 14px 10px;
	background: transparent;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	text-align: center;
	color: #64748b;
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	transition: all 0.3s ease;
}

.mms-nav-link:hover {
	color: #1a3a5c;
	border-bottom-color: #cbd5e1;
	background: transparent;
}

.mms-nav-link-active {
	color: #1a3a5c;
	border-bottom-color: #1a3a5c;
}

.mms-nav-link-active:hover {
	border-bottom-color: #1a3a5c;
}

.mms-section {
	margin-bottom: 30px;
}

.mms-section-title {
	font-size: 18px;
	font-weight: 700;
	color: #1e293b;
	margin-top: 30px;
	margin-bottom: 16px;
	border-bottom: 2px solid #1a3a5c;
	padding-bottom: 8px;
}

.mms-status-box {
	border-radius: 8px;
	padding: 18px 24px;
	font-size: 15px;
	border-left: 4px solid transparent;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.mms-status-box p {
	margin: 0;
	font-weight: 600;
}

.mms-status-unpaid {
	background-color: #fff5f5;
	border-left-color: #ef4444;
	color: #991b1b;
}

.mms-status-overdue {
	background-color: #fffbeb;
	border-left-color: #f59e0b;
	color: #92400e;
}

.mms-status-paid {
	background-color: #f0fdf4;
	border-left-color: #22c55e;
	color: #166534;
}

.mms-status-none {
	background: #f8fafc;
	border-left-color: #cbd5e1;
	color: #64748b;
}

.mms-info-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	margin-bottom: 20px;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid #e2e8f0;
}

.mms-info-table th,
.mms-info-table td {
	padding: 14px 18px;
	border-bottom: 1px solid #e2e8f0;
	font-size: 14px;
	text-align: left;
}

.mms-info-table tr:last-child th,
.mms-info-table tr:last-child td {
	border-bottom: none;
}

.mms-info-table th {
	width: 160px;
	background-color: #f8fafc;
	font-weight: 600;
	color: #334155;
	border-right: 1px solid #e2e8f0;
}

.mms-payment-table th,
.mms-receipt-table th {
	border-right: none;
	border-bottom: 2px solid #cbd5e1;
	white-space: nowrap;
}

.mms-payment-table td,
.mms-receipt-table td {
	color: #334155;
	white-space: nowrap;
}

.mms-warning {
	display: inline-block;
	margin-top: 4px;
	color: #b3261e;
	font-size: 12px;
	font-weight: 600;
	white-space: normal;
}

.mms-badge {
	display: inline-block;
	padding: 6px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 700;
	text-align: center;
	letter-spacing: 0.5px;
	white-space: nowrap;
}

.mms-badge-unpaid {
	background-color: #fee2e2;
	color: #991b1b;
}

.mms-badge-overdue {
	background-color: #fef3c7;
	color: #92400e;
}

.mms-badge-paid {
	background-color: #dcfce7;
	color: #166534;
}

.mms-note {
	margin-top: 16px;
	color: #666;
	font-size: 14px;
}

.mms-back {
	margin-top: 20px;
	text-align: center;
}

.mms-back a {
	color: #2c3e50;
	text-decoration: underline;
}

@media (max-width: 600px) {
	.mms-nav-list {
		flex-direction: column;
	}

	.mms-info-table th {
		width: auto;
	}

	.mms-wrapper {
		padding: 24px 16px;
	}
}

@media (max-width: 1024px) {
	.mms-payment-table,
	.mms-receipt-table {
		display: block;
		overflow-x: auto;
	}
}

.mms-admin-wrapper {
	max-width: 1000px;
}

.mms-admin-filter-form {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 20px;
	margin-bottom: 20px;
}

.mms-admin-filter-form .mms-form-group {
	margin-bottom: 0;
}

.mms-admin-filter-submit-wrap {
	display: flex;
}

.mms-admin-actions-top {
	margin-bottom: 20px;
}

.mms-admin-new-form {
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	padding: 20px;
	margin-bottom: 30px;
}

.mms-admin-table th,
.mms-admin-table td {
	white-space: nowrap;
}

.mms-admin-btn-small {
	display: inline-block;
	padding: 6px 14px;
	background: #2c3e50;
	color: #fff;
	border-radius: 4px;
	font-size: 12px;
	text-decoration: none;
	white-space: nowrap;
}

.mms-admin-btn-small:hover {
	background: #1a242f;
	color: #fff;
}

button.mms-admin-btn-small {
	border: none;
	cursor: pointer;
}

.mms-admin-btn-danger {
	background: #c0392b;
}

.mms-admin-btn-danger:hover {
	background: #962d22;
}

.mms-admin-delete-form {
	margin-top: 12px;
}

.mms-admin-edit-row td {
	background: #f9f9f9;
	white-space: normal;
}

.mms-admin-inline-form {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 20px;
}

.mms-admin-inline-form .mms-form-group {
	margin-bottom: 0;
}

.mms-admin-inline-form .mms-actions {
	margin-top: 0;
}

.mms-admin-cancel {
	margin-left: 12px;
	color: #2c3e50;
	text-decoration: underline;
}

.mms-admin-cron-info {
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	padding: 20px;
}

.mms-admin-cron-info p {
	margin: 0 0 12px;
}

@media (max-width: 1024px) {
	.mms-admin-table {
		display: block;
		overflow-x: auto;
	}
}

/* メールアドレスタイプミス警告 */
.mms-typo-warning {
	margin-top: 6px;
	padding: 8px 12px;
	background-color: #fff8e1;
	border: 1px solid #ffe082;
	border-radius: 4px;
	font-size: 13px;
	color: #7a5c00;
}

.mms-typo-warning a {
	color: #1a56db;
	font-weight: 600;
	cursor: pointer;
	text-decoration: underline;
}
