/**
 * Guest Authentication Styles (OTP認証画面) - Modern Responsive Design
 *
 * @package ShingakuEventManager
 */

/* CSS Variables */
:root {
	--shgk-primary: #2271b1;
	--shgk-primary-hover: #135e96;
	--shgk-success: #00a32a;
	--shgk-success-bg: #d4edda;
	--shgk-success-border: #28a745;
	--shgk-error: #d63638;
	--shgk-error-bg: #f8d7da;
	--shgk-error-border: #dc3545;
	--shgk-info: #0c5460;
	--shgk-info-bg: #d1ecf1;
	--shgk-text-dark: #1e1e1e;
	--shgk-text-medium: #555;
	--shgk-text-light: #666;
	--shgk-border: #ddd;
	--shgk-bg-light: #f7f7f7;
	--shgk-bg-white: #fff;
	--shgk-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
	--shgk-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
	--shgk-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
	--shgk-radius-sm: 6px;
	--shgk-radius-md: 8px;
	--shgk-radius-lg: 12px;
}

/* コンテナ */
.shgk-mypage-container {
	max-width: 1200px;
	margin: 40px auto;
	padding: 0 20px;
}

.shgk-mypage-content {
	background: var(--shgk-bg-white);
	padding: 40px;
	border-radius: var(--shgk-radius-lg);
	box-shadow: var(--shgk-shadow-md);
}

/* 認証画面 */
.shgk-auth-screen {
	max-width: 500px;
	margin: 0 auto;
}

.shgk-auth-screen h2 {
	text-align: center;
	margin-bottom: 12px;
	color: var(--shgk-text-dark);
	font-size: 2em;
	font-weight: 700;
}

.shgk-auth-screen > p {
	text-align: center;
	color: var(--shgk-text-light);
	margin-bottom: 32px;
	line-height: 1.6;
	font-size: 1.05em;
}

/* フォーム */
.shgk-auth-form {
	margin-bottom: 24px;
}

.shgk-form-group {
	margin-bottom: 24px;
}

.shgk-form-group label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: var(--shgk-text-dark);
	font-size: 0.95em;
}

.shgk-form-group input[type="email"],
.shgk-form-group input[type="text"] {
	width: 100%;
	padding: 14px 16px;
	font-size: 16px;
	border: 2px solid var(--shgk-border);
	border-radius: var(--shgk-radius-sm);
	box-sizing: border-box;
	transition: all 0.2s ease;
	background: var(--shgk-bg-white);
}

.shgk-form-group input[type="email"]:focus,
.shgk-form-group input[type="text"]:focus {
	outline: none;
	border-color: var(--shgk-primary);
	box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

/* ボタン */
.shgk-button {
	display: inline-block;
	padding: 14px 28px;
	font-size: 16px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	border: none;
	border-radius: var(--shgk-radius-sm);
	cursor: pointer;
	transition: all 0.2s ease;
	width: 100%;
}

.shgk-button-primary {
	background-color: var(--shgk-primary);
	color: var(--shgk-bg-white);
	box-shadow: var(--shgk-shadow-sm);
}

.shgk-button-primary:hover {
	background-color: var(--shgk-primary-hover);
	transform: translateY(-1px);
	box-shadow: var(--shgk-shadow-md);
}

.shgk-button-secondary {
	background-color: var(--shgk-bg-light);
	color: var(--shgk-text-dark);
	border: 2px solid var(--shgk-border);
}

.shgk-button-secondary:hover {
	background-color: #e8e8e8;
	border-color: #bbb;
}

.shgk-button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

/* 注意事項 */
.shgk-auth-note {
	margin-top: 32px;
	padding: 16px 20px;
	background-color: var(--shgk-info-bg);
	border-left: 4px solid var(--shgk-info);
	border-radius: var(--shgk-radius-sm);
}

.shgk-auth-note p {
	margin: 0 0 10px 0;
	color: var(--shgk-text-medium);
	font-weight: 600;
}

.shgk-auth-note ul {
	margin: 0;
	padding-left: 20px;
	color: var(--shgk-text-light);
}

.shgk-auth-note li {
	margin-bottom: 6px;
	line-height: 1.5;
}

.shgk-auth-note a {
	color: var(--shgk-primary);
	text-decoration: none;
	font-weight: 600;
}

.shgk-auth-note a:hover {
	text-decoration: underline;
}

/* 再送信セクション */
.shgk-resend-section {
	text-align: center;
	margin-top: 24px;
}

.shgk-resend-section p {
	margin-bottom: 12px;
	color: var(--shgk-text-light);
}

/* 通知メッセージ */
.shgk-notice {
	padding: 16px 20px;
	margin-bottom: 24px;
	border-left: 4px solid;
	border-radius: var(--shgk-radius-sm);
	font-weight: 500;
}

.shgk-notice.success {
	background-color: var(--shgk-success-bg);
	border-color: var(--shgk-success-border);
	color: #155724;
}

.shgk-notice.error {
	background-color: var(--shgk-error-bg);
	border-color: var(--shgk-error-border);
	color: #721c24;
}

.shgk-notice p {
	margin: 0;
}

/* マイページヘッダー */
.shgk-mypage-header {
	margin-bottom: 32px;
	padding-bottom: 20px;
	border-bottom: 2px solid var(--shgk-border);
}

.shgk-mypage-header h2 {
	margin-bottom: 12px;
	color: var(--shgk-text-dark);
	font-size: 2em;
	font-weight: 700;
}

.shgk-mypage-header p {
	margin: 0;
	color: var(--shgk-text-light);
	font-size: 1.05em;
}

.shgk-logout-link {
	margin-left: 16px;
	color: var(--shgk-primary);
	text-decoration: none;
	font-weight: 600;
	display: inline-block;
	padding: 6px 12px;
	border-radius: var(--shgk-radius-sm);
	transition: all 0.2s ease;
}

.shgk-logout-link:hover {
	background-color: rgba(34, 113, 177, 0.1);
	text-decoration: none;
}

/* セクション見出し */
.shgk-mypage-content h3 {
	font-size: 1.5em;
	font-weight: 700;
	color: var(--shgk-text-dark);
	margin: 40px 0 20px 0;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--shgk-border);
}

.shgk-mypage-content h3:first-of-type {
	margin-top: 0;
}

/* 予約テーブル - デスクトップ */
.shgk-reservations-table,
.shgk-waitlist-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 20px;
	background-color: var(--shgk-bg-white);
	border-radius: var(--shgk-radius-md);
	overflow: hidden;
	box-shadow: var(--shgk-shadow-sm);
}

.shgk-reservations-table thead,
.shgk-waitlist-table thead {
	background-color: var(--shgk-bg-light);
}

.shgk-reservations-table th,
.shgk-reservations-table td,
.shgk-waitlist-table th,
.shgk-waitlist-table td {
	padding: 14px 16px;
	text-align: left;
	border-bottom: 1px solid #e8e8e8;
}

.shgk-reservations-table th,
.shgk-waitlist-table th {
	font-weight: 700;
	color: var(--shgk-text-dark);
	font-size: 0.9em;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.shgk-reservations-table td,
.shgk-waitlist-table td {
	color: var(--shgk-text-medium);
}

.shgk-reservations-table tbody tr:hover,
.shgk-waitlist-table tbody tr:hover {
	background-color: #f9f9f9;
}

.shgk-reservations-table tbody tr:last-child td,
.shgk-waitlist-table tbody tr:last-child td {
	border-bottom: none;
}

.shgk-reservations-table a,
.shgk-waitlist-table a {
	color: var(--shgk-primary);
	text-decoration: none;
	font-weight: 600;
	padding: 6px 10px;
	border-radius: var(--shgk-radius-sm);
	transition: all 0.2s ease;
	display: inline-block;
}

.shgk-reservations-table a:hover,
.shgk-waitlist-table a:hover {
	background-color: rgba(34, 113, 177, 0.1);
	text-decoration: none;
}

/* Zoomボタン */
.shgk-zoom-button {
	display: inline-block;
	background-color: var(--shgk-primary);
	color: white !important;
	padding: 8px 16px;
	text-decoration: none;
	border-radius: var(--shgk-radius-sm);
	font-size: 14px;
	font-weight: 600;
	transition: all 0.2s ease;
	box-shadow: var(--shgk-shadow-sm);
}

.shgk-zoom-button:hover {
	background-color: var(--shgk-primary-hover);
	color: white !important;
	text-decoration: none;
	transform: translateY(-1px);
	box-shadow: var(--shgk-shadow-md);
}

/* イベント名リンク */
.shgk-event-link {
	color: var(--shgk-primary);
	text-decoration: none;
	font-weight: 600;
	transition: color 0.2s ease;
}

.shgk-event-link:hover {
	color: var(--shgk-primary-hover);
	text-decoration: underline;
}

/* 空状態メッセージ */
.shgk-mypage-content > p {
	color: var(--shgk-text-light);
	padding: 24px;
	background-color: var(--shgk-bg-light);
	border-radius: var(--shgk-radius-sm);
	text-align: center;
	margin: 20px 0;
}

/* タブレット対応 */
@media (max-width: 992px) {
	.shgk-reservations-table,
	.shgk-waitlist-table {
		font-size: 14px;
	}

	.shgk-reservations-table th,
	.shgk-reservations-table td,
	.shgk-waitlist-table th,
	.shgk-waitlist-table td {
		padding: 12px 14px;
	}
}

/* スマホ対応 - テーブルをカード表示に */
@media (max-width: 768px) {
	.shgk-mypage-container {
		padding: 0 16px;
		margin: 20px auto;
	}

	.shgk-mypage-content {
		padding: 24px 20px;
	}

	.shgk-auth-screen h2 {
		font-size: 1.6em;
	}

	.shgk-mypage-header h2 {
		font-size: 1.6em;
	}

	.shgk-mypage-header p {
		font-size: 0.95em;
	}

	.shgk-logout-link {
		display: block;
		margin: 12px 0 0 0;
		text-align: center;
	}

	.shgk-mypage-content h3 {
		font-size: 1.3em;
		margin-top: 32px;
	}

	/* テーブルをカード表示に変換 */
	.shgk-reservations-table,
	.shgk-waitlist-table {
		display: block;
		box-shadow: none;
	}

	.shgk-reservations-table thead,
	.shgk-waitlist-table thead {
		display: none;
	}

	.shgk-reservations-table tbody,
	.shgk-waitlist-table tbody {
		display: block;
	}

	.shgk-reservations-table tr,
	.shgk-waitlist-table tr {
		display: block;
		margin-bottom: 16px;
		background: var(--shgk-bg-white);
		border-radius: var(--shgk-radius-md);
		box-shadow: var(--shgk-shadow-sm);
		padding: 16px;
		border: 1px solid #e8e8e8;
	}

	.shgk-reservations-table tr:hover,
	.shgk-waitlist-table tr:hover {
		background-color: var(--shgk-bg-white);
		box-shadow: var(--shgk-shadow-md);
	}

	.shgk-reservations-table td,
	.shgk-waitlist-table td {
		display: flex;
		padding: 10px 0;
		border-bottom: 1px solid #f0f0f0;
		justify-content: space-between;
		align-items: center;
	}

	.shgk-reservations-table td:last-child,
	.shgk-waitlist-table td:last-child {
		border-bottom: none;
		padding-top: 14px;
		justify-content: center;
	}

	.shgk-reservations-table td::before,
	.shgk-waitlist-table td::before {
		content: attr(data-label);
		font-weight: 700;
		color: var(--shgk-text-dark);
		font-size: 0.85em;
		text-transform: uppercase;
		letter-spacing: 0.5px;
		flex-shrink: 0;
		width: 40%;
	}

	.shgk-reservations-table td:last-child::before,
	.shgk-waitlist-table td:last-child::before {
		display: none;
	}

	/* カード内のボタンとリンク */
	.shgk-reservations-table a,
	.shgk-waitlist-table a,
	.shgk-zoom-button {
		width: 100%;
		text-align: center;
		padding: 12px 20px;
	}

	/* QRコード画像 */
	.shgk-reservations-table td img {
		max-width: 120px;
		height: auto;
	}
}

/* 小型スマホ対応 */
@media (max-width: 480px) {
	.shgk-mypage-content {
		padding: 20px 16px;
	}

	.shgk-form-group input[type="email"],
	.shgk-form-group input[type="text"] {
		font-size: 16px; /* iOS Safariのズーム防止 */
		padding: 12px 14px;
	}

	.shgk-button {
		padding: 12px 24px;
		font-size: 15px;
	}

	.shgk-auth-screen h2 {
		font-size: 1.4em;
	}

	.shgk-mypage-header h2 {
		font-size: 1.4em;
	}

	.shgk-mypage-content h3 {
		font-size: 1.2em;
	}

	.shgk-reservations-table td::before,
	.shgk-waitlist-table td::before {
		width: 45%;
		font-size: 0.8em;
	}
}

/* ステータスバッジスタイル */
.shgk-status-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: var(--shgk-radius-sm);
	font-size: 0.85em;
	font-weight: 500;
}

.shgk-status-badge.status-confirmed {
	background: #d4edda;
	color: #155724;
}

.shgk-status-badge.status-cancelled {
	background: #f8d7da;
	color: #721c24;
}

.shgk-status-badge.status-checked_in {
	background: #d1ecf1;
	color: #0c5460;
}

/* アコーディオン */
.shgk-accordion-container {
	margin-top: 30px;
}

.shgk-accordion-toggle {
	width: 100%;
	padding: 16px 20px;
	background-color: var(--shgk-bg-light);
	border: 2px solid var(--shgk-border);
	border-radius: var(--shgk-radius-sm);
	text-align: left;
	font-size: 1.1em;
	font-weight: 600;
	color: var(--shgk-text-dark);
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	gap: 12px;
}

.shgk-accordion-toggle:hover {
	background-color: #e8e8e8;
	border-color: #bbb;
}

.shgk-accordion-icon {
	display: inline-block;
	transition: transform 0.3s ease;
	font-size: 0.9em;
	color: var(--shgk-primary);
}

.shgk-accordion-content {
	overflow: hidden;
	transition: all 0.3s ease;
}

/* もっと見るボタン */
.shgk-load-more-container {
	text-align: center;
	margin-top: 24px;
	padding: 20px 0;
}

.shgk-load-more-button {
	display: inline-block;
	padding: 12px 32px;
	background-color: var(--shgk-bg-white);
	color: var(--shgk-primary);
	border: 2px solid var(--shgk-primary);
	border-radius: var(--shgk-radius-sm);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: var(--shgk-shadow-sm);
}

.shgk-load-more-button:hover {
	background-color: var(--shgk-primary);
	color: var(--shgk-bg-white);
	transform: translateY(-1px);
	box-shadow: var(--shgk-shadow-md);
}

/* セクション見出し（h4） */
.shgk-mypage-content h4 {
	font-size: 1.3em;
	font-weight: 600;
	color: var(--shgk-text-dark);
	margin: 30px 0 16px 0;
}

/* スマホ対応 - アコーディオン */
@media (max-width: 768px) {
	.shgk-accordion-toggle {
		padding: 14px 16px;
		font-size: 1em;
	}

	.shgk-load-more-button {
		width: 100%;
		padding: 14px 24px;
	}

	.shgk-mypage-content h4 {
		font-size: 1.1em;
		margin: 24px 0 12px 0;
	}
}

/* ============================================
 * 予約カード（タイル形式）
 * ============================================ */
.shgk-reservations-grid,
.shgk-waitlist-grid {
	display: grid;
	gap: 16px;
	margin-top: 20px;
}

.shgk-reservation-card,
.shgk-waitlist-card {
	background: var(--shgk-bg-white);
	border: 1px solid #e8e8e8;
	border-radius: var(--shgk-radius-md);
	padding: 20px;
	box-shadow: var(--shgk-shadow-sm);
	transition: all 0.2s ease;
	display: none;
}

.shgk-reservation-card:hover,
.shgk-waitlist-card:hover {
	box-shadow: var(--shgk-shadow-md);
	border-color: #d0d0d0;
}

/* 初期表示はJavaScriptで制御（CSSでの固定表示は不要） */

/* カードヘッダー（タイトル + ステータス） */
.shgk-card-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid #f0f0f0;
}

.shgk-card-title-area {
	flex: 1;
	min-width: 0;
}

.shgk-event-title {
	display: block;
	font-size: 1.1em;
	font-weight: 600;
	color: var(--shgk-primary);
	text-decoration: none;
	margin-bottom: 6px;
	line-height: 1.4;
	word-break: break-word;
}

.shgk-event-title:hover {
	color: var(--shgk-primary-hover);
	text-decoration: underline;
}

.shgk-event-type {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 0.85em;
	color: var(--shgk-text-light);
}

.shgk-event-type .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* ステータスバッジ */
.shgk-status-badge {
	display: inline-block;
	padding: 6px 12px;
	border-radius: var(--shgk-radius-sm);
	font-size: 0.85em;
	font-weight: 600;
	white-space: nowrap;
	line-height: 1;
}

.shgk-status-badge.status-confirmed {
	background-color: rgba(34, 177, 76, 0.1);
	color: #22b14c;
}

.shgk-status-badge.status-cancelled {
	background-color: rgba(220, 53, 69, 0.1);
	color: #dc3545;
}

.shgk-status-badge.status-checked_in {
	background-color: rgba(0, 123, 255, 0.1);
	color: #007bff;
}

.shgk-status-badge.status-waiting {
	background-color: rgba(255, 193, 7, 0.1);
	color: #ffc107;
}

.shgk-status-badge.status-notified {
	background-color: rgba(23, 162, 184, 0.1);
	color: #17a2b8;
}

.shgk-status-badge.status-expired {
	background-color: rgba(108, 117, 125, 0.1);
	color: #6c757d;
}

/* カードメタ情報（日時など） */
.shgk-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 16px;
	font-size: 0.9em;
	color: var(--shgk-text-light);
}

.shgk-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.shgk-meta-item .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: #999;
}

.shgk-meta-warning {
	color: var(--shgk-error);
	font-weight: 600;
}

.shgk-meta-warning .dashicons {
	color: var(--shgk-error);
}

/* カードアクション（ボタン） */
.shgk-card-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.shgk-btn {
	display: inline-block;
	padding: 10px 20px;
	border-radius: var(--shgk-radius-sm);
	font-size: 0.95em;
	font-weight: 600;
	text-decoration: none;
	text-align: center;
	transition: all 0.2s ease;
	border: none;
	cursor: pointer;
	line-height: 1;
}

.shgk-btn-primary {
	background-color: var(--shgk-primary);
	color: white;
}

.shgk-btn-primary:hover {
	background-color: var(--shgk-primary-hover);
	color: white;
	text-decoration: none;
	transform: translateY(-1px);
	box-shadow: var(--shgk-shadow-sm);
}

.shgk-btn-danger {
	background-color: var(--shgk-error);
	color: white;
}

.shgk-btn-danger:hover {
	background-color: #c82333;
	color: white;
	text-decoration: none;
	transform: translateY(-1px);
	box-shadow: var(--shgk-shadow-sm);
}

/* ============================================
 * レスポンシブ対応
 * ============================================ */

/* タブレット（768px以下） */
@media (max-width: 768px) {
	.shgk-reservations-grid,
	.shgk-waitlist-grid {
		gap: 12px;
	}

	.shgk-reservation-card,
	.shgk-waitlist-card {
		padding: 16px;
	}

	.shgk-card-header {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}

	.shgk-status-badge {
		align-self: flex-start;
	}

	.shgk-event-title {
		font-size: 1em;
	}

	.shgk-card-meta {
		gap: 10px;
		font-size: 0.85em;
	}

	.shgk-card-actions {
		flex-direction: column;
	}

	.shgk-btn {
		width: 100%;
		padding: 12px 20px;
	}
}

/* スマホ（480px以下） */
@media (max-width: 480px) {
	.shgk-reservations-grid,
	.shgk-waitlist-grid {
		gap: 10px;
	}

	.shgk-reservation-card,
	.shgk-waitlist-card {
		padding: 14px;
	}

	.shgk-event-title {
		font-size: 0.95em;
	}

	.shgk-card-meta {
		gap: 8px;
		font-size: 0.8em;
	}

	.shgk-meta-item .dashicons {
		font-size: 14px;
		width: 14px;
		height: 14px;
	}
}

/* ダークモード対応（オプション） */
@media (prefers-color-scheme: dark) {
	/* 必要に応じてダークモードスタイルを追加 */
}
