/**
 * Agency Coupon Dashboard Styles
 *
 * Extracted from inline CSS in Snippet 59 (coupon dashboard shortcode).
 * Styles the [agency_coupon_dashboard] table, status indicators, and
 * action buttons.
 *
 * @replaces Inline CSS from Snippet 59
 * @package  HKSafeKids\Agency
 * @since    1.0.0
 */

/* Dashboard container */
.coupon-dashboard {
	width: 100%;
	margin: 20px 0;
}

/* Coupon table */
.coupon-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border-radius: 20px;
	overflow: hidden;
}

.coupon-table th,
.coupon-table td {
	padding: 14px 16px;
	text-align: left;
	border-bottom: 1px solid #e2e8f0;
}

.coupon-table th {
	background: #f8fafc;
	font-weight: 600;
	color: #1E3A8A;
}

/* Tier icon */
.tier-icon {
	width: 28px;
	height: 28px;
	vertical-align: middle;
	margin-right: 8px;
}

/* Expand/collapse button */
.expand-btn {
	background: #1E3A8A;
	color: white;
	border: none;
	padding: 6px 16px;
	border-radius: 30px;
	cursor: pointer;
	font-size: 0.8rem;
}

/* Expandable code rows */
.code-row {
	display: none;
	background: #f8fafc;
}

.code-row.expanded {
	display: table-row;
}

.code-cell {
	padding: 16px !important;
	background: #f8fafc;
}

/* Code grid layout */
.code-grid {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Individual code item card */
.code-item {
	background: #fff;
	border-radius: 16px;
	padding: 12px 16px;
	border: 1px solid #e2e8f0;
	margin-bottom: 8px;
}

/* Code value display */
.code-value {
	font-family: monospace;
	font-size: 0.9rem;
	font-weight: 600;
	color: #1E3A8A;
	word-break: break-all;
	margin-bottom: 8px;
}

/* Code action buttons row */
.code-actions {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
	margin-top: 8px;
}

/* Copy button */
.copy-btn {
	background: #F9B6A9;
	border: none;
	padding: 5px 12px;
	border-radius: 30px;
	cursor: pointer;
	color: #1E3A8A;
	font-size: 0.75rem;
}

.copy-btn.copied {
	background: #4BB543;
	color: white;
}

/* Sent checkbox label */
.sent-checkbox {
	display: flex;
	align-items: center;
	gap: 6px;
	background: #e2e8f0;
	padding: 4px 12px;
	border-radius: 30px;
	font-size: 0.75rem;
	cursor: pointer;
}

.sent-checkbox input {
	margin: 0;
	cursor: pointer;
}

/* Sent date indicator */
.sent-date {
	font-size: 0.7rem;
	color: #666;
	margin-left: 4px;
}

/* Sent details form row */
.sent-details {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px dashed #e2e8f0;
}

.sent-details input {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 20px;
	padding: 6px 12px;
	font-size: 0.75rem;
	width: auto;
	min-width: 150px;
}

.sent-details input:focus {
	outline: none;
	border-color: #F9B6A9;
}

/* Save details button */
.save-details-btn {
	background: #1E3A8A;
	color: white;
	border: none;
	padding: 5px 16px;
	border-radius: 30px;
	cursor: pointer;
	font-size: 0.7rem;
}

/* Check status button */
.check-status-btn {
	background: #e2e8f0;
	color: #1E3A8A;
	border: none;
	padding: 5px 12px;
	border-radius: 30px;
	cursor: pointer;
	font-size: 0.65rem;
	margin-left: 8px;
}

/* Redemption status indicators */
.redeemed-status {
	font-size: 0.7rem;
	padding: 2px 8px;
	border-radius: 20px;
	background: #f1f5f9;
	display: inline-block;
}

.redeemed-yes {
	color: #4BB543;
	font-weight: 600;
}

.redeemed-no {
	color: #e53e3e;
}

/* No codes message */
.no-codes-message {
	padding: 16px;
	text-align: center;
	color: #666;
	font-style: italic;
}

/* Saved confirmation */
.saved-info {
	font-size: 0.7rem;
	color: #4BB543;
	margin-left: 8px;
	display: none;
}

/* Responsive adjustments */
@media ( max-width: 768px ) {
	.coupon-table thead {
		display: none;
	}

	.coupon-table tr,
	.coupon-table td {
		display: block;
		width: 100%;
	}

	.coupon-table tr {
		margin-bottom: 20px;
		border: 1px solid #e2e8f0;
		border-radius: 16px;
		padding: 12px;
		background: #fff;
	}

	.coupon-table td {
		display: flex;
		justify-content: space-between;
		padding: 8px 0;
		border: none;
	}

	.coupon-table td::before {
		content: attr(data-label);
		font-weight: 600;
		color: #1E3A8A;
		width: 40%;
	}

	.code-row td {
		padding: 0 !important;
	}

	.sent-details {
		flex-direction: column;
		align-items: stretch;
	}

	.sent-details input {
		width: 100%;
	}
}
