/**
 * AFSOP Adhesion - Styles frontend
 */

/* Login Form - Bootstrap Modal Style */
.afsop-login-wrapper {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 50vh;
	padding: 20px;
}

.afsop-login-form.modal-content {
	max-width: 420px;
	width: 100%;
	margin: 0;
	padding: 0;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 0.5rem;
	box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.afsop-login-form .modal-header {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem 1.5rem;
	border-bottom: 1px solid #dee2e6;
	background-color: #f8f9fa;
	border-radius: 0.5rem 0.5rem 0 0;
}

.afsop-login-form .modal-header .modal-title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 500;
	line-height: 1.5;
	color: #212529;
}

.afsop-login-form .modal-body {
	padding: 1.5rem;
}

.afsop-login-form .modal-body .alert {
	padding: 0.75rem 1.25rem;
	margin-bottom: 1rem;
	border-radius: 0.375rem;
}

.afsop-login-form .modal-body .alert-danger {
	background-color: #f8d7da;
	border: 1px solid #f5c6cb;
	color: #721c24;
}

.afsop-login-form .modal-body #afsop-loginform {
	margin: 0;
}

.afsop-login-form .modal-body #afsop-loginform p {
	margin-bottom: 1rem;
}

.afsop-login-form .modal-body #afsop-loginform label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 500;
	color: #212529;
}

.afsop-login-form .modal-body #afsop-loginform input[type="text"],
.afsop-login-form .modal-body #afsop-loginform input[type="password"] {
	display: block;
	width: 100%;
	padding: 0.575rem 0.75rem;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.5;
	color: #212529;
	background-color: #fff;
	background-clip: padding-box;
	border: 1px solid #ced4da;
	border-radius: 0.375rem;
	transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
	box-sizing: border-box;
}

.afsop-login-form .modal-body #afsop-loginform input[type="text"]:focus,
.afsop-login-form .modal-body #afsop-loginform input[type="password"]:focus {
	color: #212529;
	background-color: #fff;
	border-color: #86b7fe;
	outline: 0;
	box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.afsop-login-form .modal-body #afsop-loginform .login-remember {
	display: flex;
	align-items: center;
	margin-bottom: 1rem;
}

.afsop-login-form .modal-body #afsop-loginform .login-remember input[type="checkbox"] {
	width: 1rem;
	height: 1rem;
	margin-right: 0.5rem;
	vertical-align: middle;
}

.afsop-login-form .modal-body #afsop-loginform .login-remember label {
	display: inline;
	margin-bottom: 0;
	font-weight: 400;
	cursor: pointer;
}

.afsop-login-form .modal-body #afsop-loginform .login-submit {
	margin-bottom: 0;
}

.afsop-login-form .modal-body #afsop-loginform #wp-submit {
	display: block;
	width: 100%;
	padding: .35rem 1rem;
	font-size: 1rem;
	line-height: 1.5;
	color: #fff;
	background-color: #94c035;
	border: 1px solid #94c035;
	border-radius: 0.375rem;
	cursor: pointer;
	transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.afsop-login-form .modal-body #afsop-loginform #wp-submit:hover {
	opacity: .8;
}

.afsop-login-form .modal-body #afsop-loginform #wp-submit:focus {
	box-shadow: 0 0 0 0.25rem #94c035;
}

.afsop-login-form .modal-footer {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 1rem 1.5rem;
	border-top: 1px solid #dee2e6;
	background-color: #f8f9fa;
	border-radius: 0 0 0.5rem 0.5rem;
	gap: 0.5rem;
}

.afsop-login-form .modal-footer p {
	margin: 0;
	font-size: 0.875rem;
	color: #6c757d;
}

.afsop-login-form .modal-footer a {
	color: #0d6efd;
	text-decoration: none;
}

.afsop-login-form .modal-footer a:hover {
	color: #0a58ca;
	text-decoration: underline;
}

/* End Login Form Modal Style */

.afsop-registration-form,
.afsop-profile-form,
.afsop-set-password-form,
.afsop-password-reset-form {
	max-width: 600px;
	margin: 0 auto;
	padding: 20px;
}

.afsop-message {
	padding: 15px;
	margin-bottom: 20px;
	border-radius: 4px;
}

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

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

.afsop-info {
	background-color: #d1ecf1;
	border: 1px solid #bee5eb;
	color: #0c5460;
}

.afsop-warning {
	background-color: #fff3cd;
	border: 1px solid #ffeeba;
	color: #856404;
}

.afsop-registration-form label,
.afsop-login-form label,
.afsop-profile-form label,
.afsop-set-password-form label,
.afsop-password-reset-form label {
	display: block;
	margin-bottom: 5px;
	font-weight: 600;
}

.afsop-registration-form input[type="text"],
.afsop-registration-form input[type="email"],
.afsop-registration-form input[type="password"],
.afsop-registration-form textarea,
.afsop-registration-form select,
.afsop-login-form input[type="text"],
.afsop-login-form input[type="password"],
.afsop-profile-form input[type="text"],
.afsop-profile-form input[type="email"],
.afsop-profile-form textarea,
.afsop-profile-form select,
.afsop-set-password-form input[type="password"],
.afsop-password-reset-form input[type="text"] {
	width: 100%;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	box-sizing: border-box;
}

.afsop-registration-form p,
.afsop-login-form p,
.afsop-profile-form p,
.afsop-set-password-form p,
.afsop-password-reset-form p {
	margin-bottom: 15px;
}

.afsop-registration-form .button,
.afsop-login-form .button,
.afsop-profile-form .button,
.afsop-set-password-form .button,
.afsop-password-reset-form .button {
	background-color: #0073aa;
	color: #fff;
	padding: 12px 24px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 16px;
}

.afsop-registration-form .button:hover,
.afsop-login-form .button:hover,
.afsop-profile-form .button:hover,
.afsop-set-password-form .button:hover,
.afsop-password-reset-form .button:hover {
	background-color: #005a87;
}

.required {
	color: #c00;
}

.afsop-login-link,
.afsop-registration-link,
.afsop-password-link,
.afsop-logout-link {
	margin-top: 20px;
	text-align: center;
}

.afsop-profile-form h3 {
	margin-top: 30px;
	padding-bottom: 10px;
	border-bottom: 1px solid #eee;
}

/* Payment Form Styles */
.afsop-payment-form {
	max-width: 600px;
	margin: 0 auto;
	padding: 20px;
}

.afsop-payment-options {
	display: flex;
	flex-direction: column;
	gap: 15px;
	margin: 20px 0;
}

.afsop-payment-option {
	display: flex;
	align-items: center;
	padding: 20px;
	border: 2px solid #ddd;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.afsop-payment-option:hover {
	border-color: #0073aa;
	background-color: #f8f9fa;
}

.afsop-payment-option input[type="radio"] {
	margin-right: 15px;
	transform: scale(1.3);
}

.afsop-payment-option input[type="radio"]:checked+.afsop-payment-option-content {
	font-weight: 600;
}

.afsop-payment-option:has(input[type="radio"]:checked) {
	border-color: #0073aa;
	background-color: #e8f4f8;
}

.afsop-payment-option.suggested {
	border-color: #28a745;
}

.afsop-payment-option-content {
	display: flex;
	justify-content: space-between;
	width: 100%;
}

.afsop-payment-option-label {
	font-size: 18px;
}

.afsop-payment-option-price {
	font-size: 20px;
	font-weight: 700;
	color: #0073aa;
}

.afsop-payment-summary {
	background-color: #f8f9fa;
	padding: 15px;
	border-radius: 8px;
	margin: 20px 0;
}

.afsop-payment-action {
	text-align: center;
	margin-top: 30px;
}

#afsop-pay-button {
	background-color: #28a745;
	color: #fff;
	padding: 15px 40px;
	font-size: 18px;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

#afsop-pay-button:hover {
	background-color: #218838;
}

#afsop-pay-button:disabled {
	background-color: #6c757d;
	cursor: not-allowed;
}

.afsop-payment-secure {
	margin-top: 15px;
	color: #666;
}

/* Payment Success Styles */
.afsop-payment-success {
	max-width: 600px;
	margin: 0 auto;
	padding: 40px 20px;
	text-align: center;
}

.afsop-success-icon {
	margin-bottom: 20px;
}

.afsop-success-icon .dashicons {
	font-size: 80px;
	width: 80px;
	height: 80px;
	color: #28a745;
}

.afsop-payment-success h2 {
	color: #28a745;
	margin-bottom: 30px;
}

.afsop-success-details {
	text-align: left;
	margin: 30px 0;
}

.afsop-success-summary {
	width: 100%;
	background-color: #f8f9fa;
	border-collapse: collapse;
}

.afsop-success-summary th,
.afsop-success-summary td {
	padding: 12px 15px;
	border-bottom: 1px solid #eee;
	text-align: left;
}

.afsop-success-summary th {
	width: 40%;
	color: #666;
}

.afsop-success-message {
	margin: 30px 0;
	padding: 20px;
	background-color: #d4edda;
	border-radius: 8px;
}

.afsop-success-actions {
	display: flex;
	justify-content: center;
	gap: 15px;
	margin-top: 30px;
}

/* Payment CTA on profile */
.afsop-payment-cta {
	text-align: center;
	margin: 20px 0 30px;
	padding: 20px;
	background-color: #fff3cd;
	border-radius: 8px;
}

.afsop-payment-cta .button-primary {
	background-color: #28a745;
	border-color: #28a745;
}

.afsop-payment-cta .button-primary:hover {
	background-color: #218838;
	border-color: #218838;
}

/* Subscription Info Section */
.afsop-subscription-info {
	margin-top: 40px;
	padding-top: 20px;
	border-top: 2px solid #eee;
}

.afsop-subscription-info h3 {
	margin-bottom: 20px;
}

.afsop-subscription-info h4 {
	margin-top: 30px;
	margin-bottom: 15px;
	color: #333;
}

.afsop-info-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 20px;
}

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

.afsop-info-table th {
	width: 40%;
	color: #666;
	font-weight: 600;
}

.afsop-history-table {
	width: 100%;
	border-collapse: collapse;
	background-color: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.afsop-history-table thead th {
	background-color: #f8f9fa;
	padding: 12px 15px;
	border-bottom: 2px solid #ddd;
	text-align: left;
	font-weight: 600;
	color: #333;
}

.afsop-history-table tbody td {
	padding: 12px 15px;
	border-bottom: 1px solid #eee;
}

.afsop-history-table tbody tr:last-child td {
	border-bottom: none;
}

.afsop-history-table tbody tr:hover {
	background-color: #f8f9fa;
}

/* Status Badges */
.afsop-status-badge {
	display: inline-block;
	padding: 5px 12px;
	border-radius: 20px;
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
}

.afsop-status-badge.status-active {
	background-color: #d4edda;
	color: #155724;
}

.afsop-status-badge.status-grace {
	background-color: #fff3cd;
	color: #856404;
}

.afsop-status-badge.status-past {
	background-color: #f8d7da;
	color: #721c24;
}

.afsop-status-badge.status-none {
	background-color: #e9ecef;
	color: #6c757d;
}

/* Contenu restreint */
.afsop-restricted-content {
	text-align: center;
	padding: 40px 20px;
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	border-radius: 8px;
	border: 2px dashed #dee2e6;
	margin: 20px 0;
}

.afsop-restricted-icon {
	font-size: 48px;
	margin-bottom: 15px;
}

.afsop-restricted-content h3 {
	margin: 0 0 15px 0;
	color: #495057;
	font-size: 1.5em;
}

.afsop-restricted-content p {
	color: #6c757d;
	margin: 0 0 20px 0;
	max-width: 500px;
	margin-left: auto;
	margin-right: auto;
}

.afsop-restricted-actions {
	margin-top: 20px;
}

.afsop-btn-primary {
	display: inline-block;
	padding: 12px 24px;
	background-color: #0073aa;
	color: #fff !important;
	text-decoration: none !important;
	border-radius: 4px;
	font-weight: 600;
	transition: background-color 0.2s ease;
}

.afsop-btn-primary:hover {
	background-color: #005a87;
	color: #fff !important;
}

/* Profil public d'un membre */
.afsop-member-profile {
	max-width: 700px;
	margin: 0 auto;
	padding: 20px;
}

.afsop-member-header {
	text-align: center;
	margin-bottom: 30px;
	padding-bottom: 20px;
	border-bottom: 2px solid #0073aa;
}

.afsop-member-name {
	margin: 0;
	font-size: 1.8em;
	color: #333;
}

.afsop-member-section {
	margin-bottom: 25px;
}

.afsop-member-section h3 {
	color: #0073aa;
	font-size: 1.2em;
	margin: 0 0 15px 0;
	padding-bottom: 10px;
	border-bottom: 1px solid #eee;
}

.afsop-member-details {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.afsop-member-detail {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.afsop-detail-label {
	font-weight: 600;
	color: #555;
	min-width: 100px;
}

.afsop-detail-value {
	color: #333;
}

.afsop-detail-value a {
	color: #0073aa;
	text-decoration: none;
}

.afsop-detail-value a:hover {
	text-decoration: underline;
}

.afsop-member-specialties {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.afsop-specialty-badge {
	display: inline-block;
	padding: 6px 12px;
	background-color: #e1f0f8;
	color: #0073aa;
	border-radius: 20px;
	font-size: 0.9em;
	font-weight: 500;
}

.afsop-member-hours {
	background-color: #f8f9fa;
	padding: 15px;
	border-radius: 4px;
	color: #555;
	line-height: 1.6;
}

.afsop-member-description {
	line-height: 1.7;
	color: #444;
}

.afsop-member-meta {
	margin-top: 30px;
	padding-top: 20px;
	border-top: 1px solid #eee;
}

.afsop-member-since {
	color: #888;
	font-style: italic;
	font-size: 0.9em;
	margin: 0;
}

.afsop-member-actions {
	margin-top: 30px;
	padding-top: 20px;
	border-top: 1px solid #eee;
}

.afsop-member-actions .button {
	display: inline-block;
	padding: 10px 20px;
	background-color: #f0f0f0;
	color: #333;
	text-decoration: none;
	border-radius: 4px;
	border: 1px solid #ddd;
	transition: all 0.2s ease;
}

.afsop-member-actions .button:hover {
	background-color: #e0e0e0;
	color: #333;
}

/* Annuaire des membres */
.afsop-members-directory {
	max-width: 900px;
	margin: 0 auto;
	padding: 20px;
}

.afsop-members-directory h2 {
	margin: 0 0 20px 0;
	color: #333;
}

.afsop-directory-search {
	margin-bottom: 25px;
}

.afsop-search-box {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.afsop-search-box input[type="search"] {
	flex: 1;
	min-width: 200px;
	padding: 10px 15px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
}

.afsop-search-box .button {
	padding: 10px 20px;
	background-color: #0073aa;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	transition: background-color 0.2s ease;
}

.afsop-search-box .button:hover {
	background-color: #005a87;
}

.afsop-search-box .button-secondary {
	background-color: #f0f0f0;
	color: #333;
	border: 1px solid #ddd;
}

.afsop-search-box .button-secondary:hover {
	background-color: #e0e0e0;
}

.afsop-directory-count {
	color: #666;
	margin-bottom: 15px;
}

.afsop-no-results {
	text-align: center;
	color: #666;
	padding: 40px 20px;
	background-color: #f8f9fa;
	border-radius: 4px;
}

.afsop-directory-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	border-radius: 4px;
	overflow: hidden;
}

.afsop-directory-table thead {
	background-color: #f8f9fa;
}

.afsop-directory-table th {
	padding: 12px 15px;
	text-align: left;
	font-weight: 600;
	color: #333;
	border-bottom: 2px solid #dee2e6;
}

.afsop-directory-table th a {
	color: #333;
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 5px;
}

.afsop-directory-table th a:hover {
	color: #0073aa;
}

.afsop-directory-table th.sorted a {
	color: #0073aa;
}

.afsop-sort-indicator::after {
	content: '↕';
	opacity: 0.3;
	font-size: 0.8em;
}

.afsop-directory-table th.sorted.asc .afsop-sort-indicator::after {
	content: '↑';
	opacity: 1;
}

.afsop-directory-table th.sorted.desc .afsop-sort-indicator::after {
	content: '↓';
	opacity: 1;
}

.afsop-directory-table td {
	padding: 12px 15px;
	border-bottom: 1px solid #eee;
	vertical-align: middle;
}

.afsop-directory-table tbody tr:hover {
	background-color: #f8f9fa;
}

.afsop-directory-table tbody tr:last-child td {
	border-bottom: none;
}

.afsop-member-link {
	color: #0073aa;
	text-decoration: none;
	font-weight: 500;
}

.afsop-member-link:hover {
	text-decoration: underline;
}

.afsop-directory-table .column-name {
	min-width: 200px;
}

.afsop-directory-table .column-specialites {
	min-width: 200px;
}

.afsop-directory-table .column-ville {
	min-width: 150px;
}

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

.afsop-pagination-info {
	color: #666;
	font-size: 14px;
}

.afsop-pagination-links {
	display: flex;
	gap: 5px;
}

.afsop-page-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	background-color: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	color: #333;
	text-decoration: none;
	font-size: 14px;
	transition: all 0.2s ease;
}

.afsop-page-link:hover {
	background-color: #0073aa;
	border-color: #0073aa;
	color: #fff;
}

.afsop-page-link.current {
	background-color: #0073aa;
	border-color: #0073aa;
	color: #fff;
	font-weight: 600;
}

/* Responsive annuaire */
@media screen and (max-width: 768px) {
	.afsop-members-directory {
		padding: 10px;
	}

	.afsop-directory-table thead {
		display: none;
	}

	.afsop-directory-table,
	.afsop-directory-table tbody,
	.afsop-directory-table tr,
	.afsop-directory-table td {
		display: block;
	}

	.afsop-directory-table tr {
		margin-bottom: 15px;
		background: #fff;
		border: 1px solid #ddd;
		border-radius: 4px;
		padding: 10px;
	}

	.afsop-directory-table td {
		padding: 8px 10px;
		border-bottom: 1px solid #eee;
		display: flex;
		justify-content: space-between;
		align-items: flex-start;
	}

	.afsop-directory-table td::before {
		content: attr(data-label);
		font-weight: 600;
		color: #555;
		margin-right: 10px;
		flex-shrink: 0;
	}

	.afsop-directory-table td:last-child {
		border-bottom: none;
	}

	.afsop-directory-pagination {
		flex-direction: column;
		align-items: center;
	}

	.afsop-search-box {
		flex-direction: column;
	}

	.afsop-search-box input[type="search"] {
		width: 100%;
	}

	.afsop-search-box .button {
		width: 100%;
	}
}
