/* Import Google Fonts for high-end typography */
/* @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap'); */

/* Main Wrapper Settings */
.nm-score-wrap {
	font-family: 'Times New Roman', Times, serif !important;
	color: #1e293b;
	max-width: 1200px;
	margin: 20px auto 40px auto;
	padding: 0 15px;
}

/* Typography Customizations */
.nm-score-wrap h1, 
.nm-score-wrap h2, 
.nm-score-wrap h3,
.nm-round-modal-title,
#nm-modal-title {
	font-family: 'Times New Roman', Times, serif !important;
	font-weight: 700;
	color: #0f172a;
}

.nm-score-wrap h1 {
	font-size: 28px;
	letter-spacing: -0.5px;
	margin-bottom: 5px;
}

.nm-score-wrap p.description {
	font-size: 14px;
	color: #64748b;
	margin-top: 0;
	margin-bottom: 25px;
}

/* Header Section */
.nm-header {
	margin-bottom: 30px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 15px;
}

.nm-header h1 {
	margin: 0;
	flex-grow: 1;
}

.scoresheet-meta {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	padding: 10px 18px;
	border-radius: 30px;
	display: flex;
	gap: 20px;
	font-size: 13px;
	box-shadow: 0 2px 4px 0 rgba(0,0,0,0.02);
}

.scoresheet-meta strong {
	color: #64748b;
}

/* Cards & Containers */
.nm-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
	margin-bottom: 25px;
	position: relative;
	overflow: hidden;
}

.nm-card h2 {
	font-size: 18px;
	margin-top: 0;
	margin-bottom: 15px;
	display: flex;
	align-items: center;
	gap: 10px;
	border-bottom: 1px solid #f1f5f9;
	padding-bottom: 12px;
}

.nm-card h2 .dashicons {
	color: #3b82f6;
	font-size: 20px;
	width: 20px;
	height: 20px;
}

/* Grid Layouts */
.nm-grid {
	display: grid;
	gap: 25px;
	margin-bottom: 25px;
}

.nm-grid.two-cols {
	grid-template-columns: 1fr;
}

@media (min-width: 768px) {
	.nm-grid.two-cols {
		grid-template-columns: 1fr 1fr;
	}
}

.max-width-600 {
	max-width: 600px;
	margin-left: 0;
}

/* Stats Cards Grid */
.nm-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 20px;
	margin-bottom: 30px;
}

.nm-stat-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 20px;
	display: flex;
	align-items: center;
	gap: 18px;
	box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.03), 0 2px 4px -2px rgb(0 0 0 / 0.03);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nm-stat-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.05);
}

.stat-icon {
	width: 52px;
	height: 52px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
}

.stat-icon .dashicons {
	font-size: 24px;
	width: 24px;
	height: 24px;
}

.bg-blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.bg-orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
.bg-green { background: linear-gradient(135deg, #10b981, #047857); }
.bg-purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }

.stat-content {
	display: flex;
	flex-direction: column;
}

.stat-label {
	font-size: 12px;
	font-weight: 500;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.stat-number {
	font-family: 'Times New Roman', Times, serif !important;
	font-size: 28px;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.2;
	margin-top: 2px;
}

/* Quick Actions Panel */
.nm-actions-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px;
}

.action-btn {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 16px;
	text-decoration: none;
	display: flex;
	flex-direction: column;
	color: #1e293b;
	transition: all 0.2s ease;
}

.action-btn:hover {
	background: #3b82f6;
	border-color: #3b82f6;
	color: #ffffff !important;
}

.action-btn .dashicons {
	font-size: 20px;
	margin-bottom: 8px;
	color: #3b82f6;
	transition: color 0.2s ease;
}

.action-btn:hover .dashicons {
	color: #ffffff;
}

.action-btn strong {
	font-size: 14px;
	font-weight: 600;
}

.action-btn small {
	font-size: 11px;
	color: #64748b;
	margin-top: 3px;
}

.action-btn:hover small {
	color: rgba(255,255,255,0.8);
}

.contact-box a {
	color: #3b82f6;
	text-decoration: none;
	font-weight: 500;
}

.contact-box a:hover {
	text-decoration: underline;
}

/* Custom Table Styling */
.nm-score-wrap table.wp-list-table {
	border-collapse: separate;
	border-spacing: 0;
	border: none;
	box-shadow: none;
	background: transparent;
}

.nm-score-wrap table.wp-list-table th {
	font-family: 'Times New Roman', Times, serif !important;
	font-weight: 600;
	color: #475569;
	background: #f8fafc;
	border-bottom: 2px solid #e2e8f0;
	padding: 14px 10px;
}

.nm-score-wrap table.wp-list-table td {
	padding: 14px 10px;
	vertical-align: middle;
	border-bottom: 1px solid #f1f5f9;
}

.nm-score-wrap table.wp-list-table tbody tr:hover {
	background-color: #f8fafc !important;
}

/* Badges */
.nm-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 30px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
}

.nm-badge.preliminary { background-color: #e0f2fe; color: #0369a1; }
.nm-badge.octafinals { background-color: #f3e8ff; color: #6b21a8; }
.nm-badge.quarterfinals { background-color: #fae8ff; color: #86198f; }
.nm-badge.semifinals { background-color: #fef3c7; color: #92400e; }
.nm-badge.finals { background-color: #fee2e2; color: #991b1b; }

.team-label {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 4px;
	font-family: monospace;
	font-weight: 700;
	font-size: 12px;
	margin-right: 5px;
}

.team-label.app { background-color: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.team-label.resp { background-color: #fff7ed; color: #c2410c; border: 1px solid #ffedd5; }

.vs-badge {
	font-size: 10px;
	font-weight: 800;
	color: #94a3b8;
	margin: 0 5px;
}

.nm-not-set {
	color: #94a3b8;
	font-style: italic;
}

.oralist-name {
	font-weight: 500;
	color: #1e293b;
}

.oralist-email {
	color: #64748b;
}

/* Glassmorphism Modals */
.nm-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(15, 23, 42, 0.45);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	z-index: 99999;
	overflow-y: auto;
	padding: 8vh 0;
	box-sizing: border-box;
}

.nm-modal-content {
	background: #ffffff;
	border-radius: 16px;
	width: 90%;
	max-width: 650px;
	margin: 0 auto;
	box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
	border: 1px solid rgba(255, 255, 255, 0.2);
	animation: modalSlide 0.3s ease;
	position: relative;
}

@keyframes modalSlide {
	from { transform: translateY(20px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

.nm-modal-header {
	padding: 20px 24px;
	border-bottom: 1px solid #f1f5f9;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.nm-modal-header h2 {
	margin: 0;
	font-size: 20px;
}

.nm-modal-close {
	font-size: 28px;
	font-weight: 300;
	color: #94a3b8;
	cursor: pointer;
	line-height: 1;
	transition: color 0.2s ease;
}

.nm-modal-close:hover {
	color: #0f172a;
}

/* Forms & Inputs */
#nm-team-form,
#nm-round-form,
#nm-judge-form {
	padding: 24px;
}

.nm-form-group {
	margin-bottom: 18px;
}

.nm-form-group label {
	display: block;
	font-weight: 500;
	font-size: 13px;
	margin-bottom: 6px;
	color: #475569;
}

.nm-form-group input[type="text"],
.nm-form-group input[type="email"],
.nm-form-group input[type="number"],
.nm-form-group input[type="datetime-local"],
.nm-form-group select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 14px;
	background-color: #ffffff;
	box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
	transition: all 0.2s ease;
}

.nm-form-group input:focus,
.nm-form-group select:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

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

.nm-form-row.two-cols > div {
	flex: 1;
}

.nm-form-section-title {
	font-family: 'Times New Roman', Times, serif !important;
	font-weight: 600;
	font-size: 14px;
	color: #1e293b;
	border-left: 3px solid #3b82f6;
	padding-left: 10px;
	margin: 25px 0 15px 0;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.nm-checkbox-grid {
	background: #f8fafc;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 12px;
	max-height: 150px;
	overflow-y: auto;
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
}

@media (min-width: 500px) {
	.nm-checkbox-grid {
		grid-template-columns: 1fr 1fr;
	}
}

.nm-checkbox-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	cursor: pointer;
}

.nm-checkbox-label input {
	margin: 0 !important;
}

.nm-modal-footer {
	padding-top: 15px;
	border-top: 1px solid #f1f5f9;
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	margin-top: 20px;
}

/* Scoresheet Matrix */
.nm-judge-scoresheet-grid {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.nm-judge-status-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	padding: 8px 12px;
	border-radius: 8px;
	gap: 10px;
}

.nm-judge-status-row .judge-name {
	font-weight: 500;
	font-size: 13px;
	flex-grow: 1;
}

.nm-status-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 600;
}

.nm-status-badge.not-started { background-color: #f1f5f9; color: #64748b; }
.nm-status-badge.draft { background-color: #fef3c7; color: #d97706; }
.nm-status-badge.submitted { background-color: #d1fae5; color: #065f46; }
.nm-status-badge.english { background-color: #e0f2fe; color: #0369a1; }
.nm-status-badge.french { background-color: #fce7f3; color: #b91c1c; }
.nm-status-badge.portuguese { background-color: #fef3c7; color: #d97706; }
.nm-status-badge.spanish { background-color: #dcfce7; color: #15803d; }
.nm-status-badge.mixed { background-color: #f3e8ff; color: #7e22ce; }

/* Scoresheet Entry */
.nm-scoresheet-card {
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.02);
}

.nm-scoresheet-card .card-header {
	padding: 16px 24px;
	color: #ffffff;
}

.nm-scoresheet-card .card-header h2 {
	margin: 0;
	font-size: 18px;
	color: #ffffff;
}

.bg-app { background: linear-gradient(135deg, #1e3a8a, #2563eb); }
.bg-resp { background: linear-gradient(135deg, #7c2d12, #ea580c); }

.nm-scoresheet-card .card-body {
	padding: 24px;
	background: #ffffff;
}

.oralists-scoring-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 30px;
}

@media (min-width: 900px) {
	.oralists-scoring-grid {
		grid-template-columns: 1fr 1fr;
	}
}

.oralist-score-panel h3 {
	margin-top: 0;
	margin-bottom: 18px;
	font-size: 15px;
	border-bottom: 2px solid #f1f5f9;
	padding-bottom: 8px;
	color: #334155;
}

.score-inputs {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.score-field-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 15px;
	padding: 8px 0;
	border-bottom: 1px dashed #f1f5f9;
}

.score-field-row.total-row {
	border-top: 2px solid #e2e8f0;
	border-bottom: none;
	padding-top: 14px;
	margin-top: 10px;
	background-color: #f8fafc;
	padding-left: 8px;
	padding-right: 8px;
	border-radius: 6px;
}

.score-field-label {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.score-field-label strong {
	font-size: 13px;
	color: #1e293b;
}

.score-field-label small {
	font-size: 11px;
	color: #64748b;
	margin-top: 2px;
}

.score-field-input-wrap {
	width: 80px;
	flex-shrink: 0;
}

.nm-score-input-item {
	width: 100%;
	padding: 6px 8px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font-size: 14px;
	text-align: center;
	font-weight: 600;
}

.nm-score-total-display {
	width: 100%;
	padding: 8px;
	border: 2px solid #cbd5e1;
	border-radius: 6px;
	font-size: 16px;
	text-align: center;
	font-weight: 700;
	background-color: #e2e8f0 !important;
	color: #0f172a;
}

.nm-form-actions-bar {
	margin-top: 30px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 16px 24px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 15px;
}

.status-indicator-bar {
	font-size: 13px;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Rankings & Standings */
.nm-card-actions {
	margin-bottom: 15px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 15px;
}

.weighting-badge {
	background: #f1f5f9;
	border: 1px solid #e2e8f0;
	padding: 8px 16px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 500;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.nm-badge-round-count {
	background: #f1f5f9;
	border: 1px solid #cbd5e1;
	padding: 2px 8px;
	border-radius: 10px;
	font-family: monospace;
	font-weight: 700;
}

.nm-rank-badge {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 700;
	color: #ffffff;
	background-color: #64748b;
}

.nm-rank-badge.rank-1 { background: linear-gradient(135deg, #fbbf24, #d97706); }
.nm-rank-badge.rank-2 { background: linear-gradient(135deg, #cbd5e1, #64748b); }
.nm-rank-badge.rank-3 { background: linear-gradient(135deg, #b45309, #78350f); }

/* Settings Form & Exporter Styles */
.nm-export-list {
	display: flex;
	flex-direction: column;
	gap: 15px;
	margin-top: 15px;
}

.nm-export-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	padding: 16px;
	border-radius: 8px;
	gap: 15px;
}

.export-details {
	display: flex;
	flex-direction: column;
}

.export-details strong {
	font-size: 14px;
	color: #0f172a;
}

.export-details small {
	font-size: 11px;
	color: #64748b;
	margin-top: 3px;
}

/* Transitions and animation details */
.button, .button-primary, .button-secondary {
	transition: all 0.15s ease-in-out !important;
}

/* Copy link styling */
.nm-copy-link-container {
	display: flex;
	align-items: center;
	gap: 6px;
}

.nm-copy-link-input {
	border: 1px solid #cbd5e1 !important;
	border-radius: 6px !important;
	background: #f8fafc !important;
	color: #64748b !important;
	font-family: monospace;
	font-size: 11px;
}

.nm-btn-copy-link {
	background: #3b82f6 !important;
	border-color: #3b82f6 !important;
	color: #ffffff !important;
	font-weight: 500 !important;
	border-radius: 6px !important;
	cursor: pointer;
}

.nm-btn-copy-link:hover {
	background: #2563eb !important;
	border-color: #2563eb !important;
}
