/**
 * Springboard Frontend Styles
 * Review queue, scoring forms, and application summary.
 */

/* =========================================================================
   Common
   ========================================================================= */

.gsb-review-queue,
.gsb-review-form {
	max-width: 900px;
	margin: 0 auto;
	font-family: inherit;
	color: #1a1a1a;
}

.gsb-back-link {
	display: inline-block;
	margin-bottom: 12px;
	color: #666;
	text-decoration: none;
	font-size: 14px;
}

.gsb-back-link:hover {
	color: #333;
}

.gsb-optional {
	font-weight: normal;
	color: #888;
	font-size: 13px;
}

/* =========================================================================
   Buttons
   ========================================================================= */

.gsb-btn {
	display: inline-block;
	padding: 10px 20px;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: opacity 0.2s, transform 0.1s;
}

.gsb-btn:hover {
	opacity: 0.9;
}

.gsb-btn:active {
	transform: scale(0.98);
}

.gsb-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.gsb-btn-primary {
	background: #2271b1;
	color: #fff;
}

.gsb-btn-success {
	background: #00a32a;
	color: #fff;
}

.gsb-btn-warning {
	background: #dba617;
	color: #1a1a1a;
}

.gsb-btn-danger {
	background: #d63638;
	color: #fff;
}

/* =========================================================================
   Review Queue
   ========================================================================= */

.gsb-queue-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 24px;
}

.gsb-queue-header h2 {
	margin: 0;
}

.gsb-role-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
}

.gsb-role-reviewer {
	background: #e8f0fe;
	color: #2271b1;
}

.gsb-role-approver {
	background: #fef3e0;
	color: #b45309;
}

.gsb-queue-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.gsb-queue-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	transition: border-color 0.2s;
}

.gsb-queue-item:hover {
	border-color: #2271b1;
}

.gsb-queue-item-main {
	flex: 1;
}

.gsb-queue-title {
	margin: 0 0 4px;
	font-size: 16px;
}

.gsb-queue-title a {
	color: #1a1a1a;
	text-decoration: none;
}

.gsb-queue-title a:hover {
	color: #2271b1;
}

.gsb-queue-meta {
	display: flex;
	gap: 16px;
	font-size: 13px;
	color: #666;
}

.gsb-queue-item-action {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.gsb-status-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 600;
	background: #f0f0f0;
	color: #555;
}

.gsb-tier-label {
	font-size: 12px;
	color: #888;
	font-weight: 600;
}

.gsb-queue-count {
	margin-top: 16px;
	text-align: right;
	font-size: 13px;
	color: #888;
}

.gsb-empty-state {
	padding: 40px 20px;
	text-align: center;
	color: #888;
	background: #f9f9f9;
	border-radius: 8px;
}

/* Returned applications section */
.gsb-returned-section {
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid #e0e0e0;
}

.gsb-returned-section h3 {
	margin: 0 0 16px;
	font-size: 16px;
	color: #666;
}

.gsb-queue-item-returned {
	background: #fafafa;
	border-color: #e8e8e8;
}

.gsb-queue-item-returned:hover {
	border-color: #e8e8e8;
}

.gsb-status-badge.gsb-status-needs_info {
	background: #fff3cd;
	color: #856404;
}

/* =========================================================================
   Application Summary
   ========================================================================= */

.gsb-application-summary {
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 24px;
	margin-bottom: 24px;
}

.gsb-summary-header h3 {
	margin: 0 0 8px;
	font-size: 20px;
}

.gsb-summary-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	font-size: 13px;
	color: #666;
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid #e0e0e0;
}

.gsb-summary-section {
	margin-bottom: 20px;
}

.gsb-summary-section h4 {
	margin: 0 0 8px;
	font-size: 15px;
	color: #333;
}

.gsb-summary-content {
	line-height: 1.6;
}

.gsb-summary-details-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px 24px;
	margin-bottom: 20px;
}

.gsb-detail {
	font-size: 14px;
	padding: 4px 0;
}

/* Budget tables */
.gsb-budget-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.gsb-budget-table td {
	padding: 6px 0;
	border-bottom: 1px solid #eee;
}

.gsb-budget-table tfoot td {
	border-top: 2px solid #ccc;
	border-bottom: none;
	padding-top: 8px;
}

.gsb-amount {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.gsb-budget-notes {
	margin: 8px 0 0;
	font-size: 13px;
	color: #666;
}

.gsb-budget-warning {
	margin-top: 8px;
	padding: 8px 12px;
	background: #fff3cd;
	border-left: 3px solid #dba617;
	border-radius: 4px;
	font-size: 13px;
	color: #856404;
}

.gsb-support-list {
	margin: 0;
	padding: 0 0 0 20px;
	line-height: 1.8;
	font-size: 14px;
}

/* =========================================================================
   Review Forms (common)
   ========================================================================= */

.gsb-review-header {
	margin-bottom: 24px;
}

.gsb-review-header h2 {
	margin: 0 0 8px;
}

.gsb-review-instruction {
	color: #666;
	font-size: 14px;
	margin: 0;
}

.gsb-review-action-section {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 24px;
}

.gsb-review-action-section h3 {
	margin: 0 0 16px;
}

.gsb-form-group {
	margin-bottom: 16px;
}

.gsb-form-group label {
	display: block;
	margin-bottom: 4px;
	font-size: 14px;
}

.gsb-form-group textarea,
.gsb-form-group select {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 14px;
	font-family: inherit;
	box-sizing: border-box;
}

.gsb-form-group textarea:focus,
.gsb-form-group select:focus {
	border-color: #2271b1;
	outline: none;
	box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
}

.gsb-action-buttons {
	display: flex;
	gap: 12px;
	margin-top: 20px;
}

/* =========================================================================
   Tier 2: Scoring Grid
   ========================================================================= */

.gsb-scoring-grid {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 20px;
}

.gsb-score-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 16px;
	background: #f9f9f9;
	border: 1px solid #e8e8e8;
	border-radius: 8px;
}

.gsb-score-label {
	flex: 1;
}

.gsb-score-label strong {
	display: block;
	font-size: 14px;
}

.gsb-score-question {
	display: block;
	font-size: 12px;
	color: #888;
	margin-top: 2px;
}

.gsb-score-input {
	display: flex;
	gap: 6px;
	flex-shrink: 0;
}

.gsb-score-option {
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.gsb-score-option input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.gsb-score-value {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 2px solid #ddd;
	border-radius: 50%;
	font-size: 14px;
	font-weight: 600;
	color: #666;
	transition: all 0.15s;
}

.gsb-score-option input[type="radio"]:checked + .gsb-score-value {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
}

.gsb-score-option:hover .gsb-score-value {
	border-color: #2271b1;
	color: #2271b1;
}

.gsb-score-legend {
	display: flex;
	justify-content: space-between;
	font-size: 11px;
	color: #999;
	padding: 0 8px;
	margin-bottom: 20px;
}

/* =========================================================================
   Tier 3: Scores Summary & Decision
   ========================================================================= */

.gsb-scores-summary {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 24px;
	margin-bottom: 24px;
}

.gsb-scores-summary h3 {
	margin: 0 0 16px;
}

.gsb-scores-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	margin-bottom: 16px;
}

.gsb-scores-table th,
.gsb-scores-table td {
	padding: 8px 10px;
	text-align: center;
	border-bottom: 1px solid #eee;
}

.gsb-scores-table th {
	background: #f5f5f5;
	font-weight: 600;
	font-size: 12px;
	color: #555;
}

.gsb-scores-table th:first-child,
.gsb-scores-table td:first-child {
	text-align: left;
}

.gsb-scores-table tfoot td {
	border-top: 2px solid #ccc;
	background: #fafafa;
}

.gsb-recommendation-box {
	padding: 12px 16px;
	border-radius: 6px;
	font-size: 15px;
}

.gsb-recommendation-approve {
	background: #d4edda;
	color: #155724;
}

.gsb-recommendation-conditional {
	background: #fff3cd;
	color: #856404;
}

.gsb-recommendation-decline {
	background: #f8d7da;
	color: #721c24;
}

/* Decision radio buttons */
.gsb-decision-options {
	display: flex;
	gap: 12px;
	margin-top: 8px;
}

.gsb-decision-option {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 14px 16px;
	border: 2px solid #ddd;
	border-radius: 8px;
	cursor: pointer;
	text-align: center;
	font-weight: 600;
	transition: all 0.15s;
}

.gsb-decision-option:hover {
	border-color: #999;
}

.gsb-decision-option input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.gsb-decision-approved input:checked ~ span { color: #155724; }
.gsb-decision-approved:has(input:checked) { border-color: #00a32a; background: #d4edda; }

.gsb-decision-conditional input:checked ~ span { color: #856404; }
.gsb-decision-conditional:has(input:checked) { border-color: #dba617; background: #fff3cd; }

.gsb-decision-declined input:checked ~ span { color: #721c24; }
.gsb-decision-declined:has(input:checked) { border-color: #d63638; background: #f8d7da; }

/* =========================================================================
   Form Messages
   ========================================================================= */

.gsb-message {
	padding: 12px 16px;
	border-radius: 6px;
	margin-bottom: 16px;
	font-size: 14px;
}

.gsb-message-success {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.gsb-message-error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

/* Loading spinner */
.gsb-loading {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid #fff;
	border-top-color: transparent;
	border-radius: 50%;
	animation: gsb-spin 0.6s linear infinite;
	margin-right: 8px;
	vertical-align: middle;
}

@keyframes gsb-spin {
	to { transform: rotate(360deg); }
}

/* =========================================================================
   Responsive
   ========================================================================= */

@media (max-width: 768px) {
	.gsb-queue-item {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.gsb-queue-item-action {
		width: 100%;
		justify-content: space-between;
	}

	.gsb-queue-meta {
		flex-direction: column;
		gap: 4px;
	}

	.gsb-summary-details-grid {
		grid-template-columns: 1fr;
	}

	.gsb-score-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.gsb-score-legend {
		flex-wrap: wrap;
		gap: 4px;
	}

	.gsb-decision-options {
		flex-direction: column;
	}

	.gsb-action-buttons {
		flex-direction: column;
	}

	.gsb-scores-table {
		font-size: 11px;
	}

	.gsb-scores-table th,
	.gsb-scores-table td {
		padding: 6px 4px;
	}
}
