/**
 * Sponsorships listing styles
 *
 * @package I_AM_Family_Portal
 */

.portal-sponsorships-listing {
	max-width: 1400px;
	margin: 0 auto;
	padding: 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.portal-sponsorships-search {
	margin-bottom: 20px;
}

.portal-sponsorships-search .portal-search-input {
	width: 100%;
	max-width: 400px;
	padding: 12px 15px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
}

.portal-sponsorships-search .portal-search-input:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}

.portal-sponsorships-table-container {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 20px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	overflow-x: auto;
}

.portal-sponsorships-table {
	width: 100%;
	border-collapse: collapse;
}

.portal-sponsorships-table th,
.portal-sponsorships-table td {
	padding: 12px 15px;
	text-align: left;
	border-bottom: 1px solid #eee;
}

.portal-sponsorships-table th {
	font-weight: 600;
	color: #23282d;
	background: #f9f9f9;
}

.portal-sponsorships-table tr:hover {
	background: #f9f9f9;
}

.portal-sponsor-list,
.portal-sponsored-children-list {
	margin: 0;
	padding-left: 20px;
	list-style: disc;
}

.portal-sponsor-list li,
.portal-sponsored-children-list li {
	margin-bottom: 4px;
}

.portal-sponsor-list a,
.portal-sponsored-children-list a,
.portal-child-link {
	color: #2271b1;
	text-decoration: none;
}

.portal-sponsor-list a:hover,
.portal-sponsored-children-list a:hover,
.portal-child-link:hover {
	text-decoration: underline;
}

.portal-action-link {
	color: #2271b1;
	text-decoration: none;
	font-size: 13px;
}

.portal-action-link:hover {
	text-decoration: underline;
}

.portal-empty {
	color: #646970;
	font-style: italic;
}

.portal-no-results {
	padding: 20px;
	text-align: center;
	color: #646970;
}

/* Pagination */
.portal-pagination-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 15px;
	margin-top: 20px;
	padding: 15px 0;
}

.portal-pagination-info {
	font-size: 14px;
	color: #646970;
}

.portal-pagination-controls {
	display: flex;
	gap: 5px;
}

.portal-pagination-btn {
	padding: 8px 12px;
	border: 1px solid #ddd;
	background: #fff;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
}

.portal-pagination-btn:hover,
.portal-pagination-btn.active {
	background: #2271b1;
	color: #fff;
	border-color: #2271b1;
}

/* Action buttons (colorful like portal_children) */
.portal-action-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	margin-right: 4px;
	border: 1px solid transparent;
	border-radius: 4px;
	cursor: pointer;
	text-decoration: none;
}

.portal-view-btn {
	background: #e7f1ff;
	color: #0056b3;
}

.portal-assign-sponsors-btn {
	background: #fff3cd;
	color: #856404;
}

.portal-link-btn {
	background: #d4edda;
	color: #155724;
}

.portal-action-btn:hover {
	opacity: 0.9;
	filter: brightness(0.95);
}

.portal-action-btn .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

/* Child actions in donor list */
.portal-sponsored-child-item {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
}

.portal-sponsored-child-item .portal-child-actions {
	display: inline-flex;
	gap: 2px;
}

/* Assign Sponsors modal - donor search/select */
#portal-sponsorships-assign-modal .portal-donor-select-wrap {
	position: relative;
	flex: 1;
	min-width: 200px;
	display: flex;
	gap: 8px;
	align-items: center;
}

#portal-sponsorships-assign-modal .portal-donor-search-input {
	flex: 1;
	min-width: 180px;
	padding: 8px 12px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	font-size: 14px;
}

#portal-sponsorships-assign-modal .portal-donor-search-input:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

#portal-sponsorships-assign-modal .portal-donor-search-input[readonly] {
	background: #f0f0f1;
	color: #1d2327;
}

#portal-sponsorships-assign-modal .portal-change-donor-btn {
	flex-shrink: 0;
}

#portal-sponsorships-assign-modal .portal-sponsor-date {
	width: 140px;
}

#portal-sponsorships-assign-modal .portal-sponsor-notes {
	flex: 1;
	min-width: 120px;
}
