.tpw-admin-form-container form {max-width:880px;}
.tpw-admin-form-container .tpw-field {margin-bottom:16px; display:block;}
.tpw-admin-form-container .tpw-field-row {display:flex; gap:24px; flex-wrap:wrap;}
.tpw-admin-form-container .tpw-field-row .tpw-field {flex:1 1 200px;}
.tpw-admin-form-container .tpw-field-row.tpw-dates-row {display:flex; gap:24px; flex-wrap:nowrap;}
.tpw-admin-form-container .tpw-field-row.tpw-dates-row .tpw-field {flex:1 1 0; min-width:0;}
.tpw-admin-form-container .tpw-field-row.tpw-rsvp-row {display:flex; gap:24px; flex-wrap:nowrap;}
.tpw-admin-form-container .tpw-field-row.tpw-rsvp-row .tpw-field {flex:1 1 0; min-width:0;}
.tpw-admin-form-container label {font-weight:600; display:block; margin-bottom:4px;}
.tpw-admin-form-container input[type=text],
.tpw-admin-form-container input[type=date],
.tpw-admin-form-container input[type=time],
.tpw-admin-form-container input[type=datetime-local],
.tpw-admin-form-container select,
.tpw-admin-form-container textarea {width:100%; box-sizing:border-box;}
.tpw-admin-form-container textarea {min-height:120px;}
.tpw-admin-form-container .tpw-field-files input[type=file] {padding:6px 0;}
.tpw-admin-form-container .tpw-actions {margin-top:24px;}

/* Normalize control heights (make time input match select) */
.tpw-admin-form-container input[type=text],
.tpw-admin-form-container input[type=date],
.tpw-admin-form-container input[type=time],
.tpw-admin-form-container input[type=datetime-local],
.tpw-admin-form-container select {
	padding:6px 10px;
	height:38px;
	line-height:1.2;
}

/* File list + icons */
.tpw-file-list {list-style:none; margin:8px 0 0; padding:0;}
.tpw-file-list .tpw-file-item {display:flex; align-items:center; gap:8px; margin:4px 0; line-height:1.3;}
.tpw-file-thumb {width:36px; height:36px; object-fit:cover; border-radius:4px; border:1px solid #e2e2e2; flex:0 0 36px; background:#fff;}
.tpw-file-icon {width:16px; height:16px; display:inline-block; color:#555; flex:0 0 16px;}
.tpw-file-item a {text-decoration:none;}
.tpw-file-item a:hover {text-decoration:underline;}
.tpw-file-item .tpw-delete-file {margin-left:auto;}

/* Color accents per type */
.tpw-icon-image {color:#1d72b8;}
.tpw-icon-pdf {color:#d32f2f;}
.tpw-icon-doc {color:#1565c0;}
.tpw-icon-xls {color:#2e7d32;}
.tpw-icon-generic {color:#757575;}

/* Fixtures list: action buttons group */
.tpw-actions-group { display:inline-flex; gap:8px; flex-wrap:wrap; align-items:center; }
.tpw-actions-group .button.small { 
	padding: 6px 10px; 
	height: 32px; 
	line-height: 20px; 
	font-size: 13px; 
	border-radius: 6px; 
	white-space: nowrap; 
}
.tpw-action { color:#fff; border:0; }
.tpw-action-edit { background: var(--tpw-action-edit); }
.tpw-action-copy { background:#6c5ce7; }
.tpw-action-delete { background:var(--tpw-btn-danger); }
.tpw-action-info { background:#009688; } 
.tpw-action-apply { background:#1b9e77; }
.tpw-action-applied { background:var(--tpw-btn-secondary) }
.tpw-modal .tpw-action-applied { background:#8d8d8d !important; color:#fff !important; }

.tpw-actions-group .tpw-action:hover { filter: brightness(0.95); }
.tpw-actions-group .tpw-action:focus { outline: 2px solid rgba(0,0,0,.25); outline-offset: 2px; }

/* Match Manager Fixture page layout alignment */
#tpw-mm-page .tpw-mm-card { background:#fff; border:1px solid #e5e5e5; border-radius:8px; padding:16px 18px; box-shadow:0 2px 10px rgba(0,0,0,0.06); margin-top:14px; }
#tpw-mm-page .tpw-mm-card > h2,
#tpw-mm-page .tpw-mm-title { margin:0 0 10px; font-size:24px; font-weight:700; text-align:center; }
#tpw-mm-page .tpw-field-row { display:grid; gap:18px 24px; align-items:center; margin:10px 0; }
#tpw-mm-page .tpw-field-row.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#tpw-mm-page .tpw-field-row.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#tpw-mm-page .tpw-field-row.cols-1 { grid-template-columns: 1fr; }
#tpw-mm-page .tpw-field { display:flex; align-items:center; gap:12px; min-width:0; }
#tpw-mm-page .tpw-field > strong { min-width: 140px; display:inline-block; }
#tpw-mm-page .tpw-field.tpw-field-stack { display:block; }
#tpw-mm-page .tpw-field.tpw-field-stack > label { display:block; margin-bottom:6px; }
#tpw-mm-page select,
#tpw-mm-page input[type=text] { width:100%; max-width:320px; }
#tpw-mm-page textarea { width:100%; }
#tpw-mm-page .table-head .table-cell,
#tpw-mm-page .table-row .table-cell { padding: 8px 10px; }

/* Responsive: stack to single column on small screens */
@media (max-width: 640px) {
	#tpw-mm-page .tpw-field-row.cols-3 { grid-template-columns: 1fr; }
	#tpw-mm-page .tpw-field-row.cols-2 { grid-template-columns: 1fr; }
	#tpw-mm-page .tpw-field > strong { min-width: 110px; }
	#tpw-mm-page .tpw-mm-card { padding:14px; }
	#tpw-mm-page .tpw-mm-title { font-size:22px; }
}

/* Tablet breakpoint: 641px to 1024px */
@media (min-width: 641px) and (max-width: 1024px) {
	/* Use two columns instead of three */
	#tpw-mm-page .tpw-field-row.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	/* Keep two columns for .cols-2 but tighten gaps */
	#tpw-mm-page .tpw-field-row { gap:14px 18px; }
	#tpw-mm-page .tpw-mm-card { padding:16px; }
	#tpw-mm-page .tpw-mm-title { font-size:23px; }
}

/* Applications table: allow horizontal scroll on narrower screens */
#tpw-mm-page .table-container { overflow-x: auto; }
#tpw-mm-page .table-head, 
#tpw-mm-page #tpw-mm-app-list { min-width: 760px; }

/* Responsive stacked layout for applications table */
@media (max-width: 768px) {
	/* Hide desktop head, stack rows */
	#tpw-mm-page .table-head { display: none; }
	#tpw-mm-page #tpw-mm-app-list { min-width: 0; }
	#tpw-mm-page .table-row { 
		display: grid; 
		grid-template-columns: 1fr; 
		gap: 8px; 
		padding: 12px; 
		border: 1px solid #e5e5e5; 
		border-radius: 8px; 
		background: #fff; 
		margin-bottom: 12px;
	}
	#tpw-mm-page .table-row .table-cell { 
		display: flex; 
		align-items: center; 
		gap: 10px; 
		padding: 0; 
		position: relative;
	}
	#tpw-mm-page .table-row .table-cell::before { 
		content: attr(data-label) ":"; 
		flex: 0 0 140px; 
		font-weight: 600; 
		color: #333; 
	}
	#tpw-mm-page .table-row .table-cell:last-child { justify-content: flex-end; }
	#tpw-mm-page .table-row input[type="text"],
	#tpw-mm-page .table-row textarea,
	#tpw-mm-page .table-row select { flex: 1 1 auto; max-width: 100%; }
	#tpw-mm-page .table-row input[type="checkbox"] { transform: translateY(1px); }

	/* Ensure header row is hidden even if the table sits outside #tpw-mm-page */
	.table-container .table-head { display: none !important; }
}

/* Special Fixtures: Questions list spacing and button sizing */
.tpw-admin-form-container .tpw-spfx-questions {
	padding-left: 20px;
}
.tpw-admin-form-container .tpw-spfx-questions li {
	margin: 6px 0;
	line-height: 1.4;
}
.tpw-admin-form-container .tpw-spfx-questions .button {
	margin: 2px 6px 2px 0; /* create space so buttons do not touch */
	vertical-align: top;
}
.tpw-admin-form-container .tpw-spfx-questions .button.button-small {
	padding: 4px 8px; /* slightly smaller button to reduce crowding */
	height: 28px;
	line-height: 20px;
	font-size: 12px;
}
