/**
 * Frontend Styles
 *
 * Styles for registration forms and frontend components
 *
 * @package PsyProfile
 * @since 1.0.0
 */

/* =============================================================================
   Registration Form Wrapper
   ========================================================================== */

.psy-registration-wrapper {
	max-width: 600px;
	margin: 2rem auto;
	padding: 2rem;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.psy-register-form {
	width: 100%;
}

/* =============================================================================
   Form Header
   ========================================================================== */

.psy-form-header {
	text-align: center;
	margin-bottom: 2rem;
	padding-bottom: 1.5rem;
	border-bottom: 2px solid #f0f0f0;
}

.psy-form-header h2 {
	margin: 0 0 0.5rem;
	color: #333;
	font-size: 1.75rem;
	font-weight: 600;
}

.psy-form-header p {
	margin: 0;
	color: #666;
	font-size: 0.95rem;
}

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

.psy-form-messages {
	margin-bottom: 1.5rem;
	display: none;
}

.psy-form-messages.show {
	display: block;
}

.psy-message {
	padding: 1rem 1.25rem;
	margin-bottom: 1rem;
	border-radius: 4px;
	font-size: 0.95rem;
}

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

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

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

/* =============================================================================
   Form Fields
   ========================================================================== */

.psy-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.25rem;
	margin-bottom: 1.25rem;
}

.psy-form-field {
	margin-bottom: 1.25rem;
}

.psy-form-field label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 500;
	color: #333;
	font-size: 0.95rem;
}

.psy-form-field label .required {
	color: #dc3545;
	margin-left: 2px;
}

.psy-form-field input[type="text"],
.psy-form-field input[type="email"],
.psy-form-field input[type="tel"],
.psy-form-field input[type="password"],
.psy-form-field select,
.psy-form-field textarea {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 1rem;
	font-family: inherit;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.psy-form-field input:focus,
.psy-form-field select:focus,
.psy-form-field textarea:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.psy-form-field input::placeholder {
	color: #999;
}

.psy-form-field small {
	display: block;
	margin-top: 0.35rem;
	color: #666;
	font-size: 0.85rem;
}

.psy-form-field textarea {
	resize: vertical;
	min-height: 80px;
}

.psy-form-field select:disabled {
	background: #f5f5f5;
	color: #999;
	cursor: not-allowed;
}

/* =============================================================================
   Checkbox Fields
   ========================================================================== */

.psy-form-checkbox {
	margin: 1.5rem 0;
}

.psy-form-checkbox label {
	display: flex;
	align-items: flex-start;
	font-weight: normal;
	cursor: pointer;
}

.psy-form-checkbox input[type="checkbox"] {
	margin-right: 0.75rem;
	margin-top: 0.25rem;
	cursor: pointer;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
}

.psy-form-checkbox a {
	color: #0073aa;
	text-decoration: none;
}

.psy-form-checkbox a:hover {
	text-decoration: underline;
}

/* =============================================================================
   Form Submit
   ========================================================================== */

.psy-form-submit {
	margin-top: 2rem;
	text-align: center;
}

.psy-btn {
	display: inline-block;
	padding: 0.875rem 2.5rem;
	font-size: 1rem;
	font-weight: 600;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.2s, transform 0.1s;
	text-decoration: none;
}

.psy-btn-primary {
	background: #0073aa;
	color: #fff;
}

.psy-btn-primary:hover {
	background: #005177;
}

.psy-btn-primary:active {
	transform: translateY(1px);
}

.psy-btn:disabled {
	background: #ccc;
	cursor: not-allowed;
	opacity: 0.6;
}

.psy-loading {
	display: inline-block;
	margin-left: 1rem;
	color: #666;
	font-style: italic;
}

.psy-loading::after {
	content: '...';
	animation: psy-dots 1.5s steps(4, end) infinite;
}

@keyframes psy-dots {
	0%, 20% {
		content: '.';
	}
	40% {
		content: '..';
	}
	60%, 100% {
		content: '...';
	}
}

/* =============================================================================
   Form Validation States
   ========================================================================== */

.psy-form-field input.error,
.psy-form-field select.error,
.psy-form-field textarea.error {
	border-color: #dc3545;
}

.psy-form-field input.error:focus,
.psy-form-field select.error:focus,
.psy-form-field textarea.error:focus {
	box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.psy-form-field input.success,
.psy-form-field select.success,
.psy-form-field textarea.success {
	border-color: #28a745;
}

.psy-form-field .error-message {
	display: block;
	margin-top: 0.5rem;
	color: #dc3545;
	font-size: 0.85rem;
}

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

@media (max-width: 768px) {
	.psy-registration-wrapper {
		padding: 1.5rem;
		margin: 1rem;
		border-radius: 6px;
	}

	.psy-form-header h2 {
		font-size: 1.5rem;
	}

	.psy-form-row {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.psy-form-field {
		margin-bottom: 1rem;
	}

	.psy-btn {
		width: 100%;
		padding: 1rem;
	}

	.psy-loading {
		display: block;
		margin-left: 0;
		margin-top: 0.75rem;
	}
}

@media (max-width: 480px) {
	.psy-registration-wrapper {
		padding: 1rem;
		margin: 0.5rem;
	}

	.psy-form-header {
		margin-bottom: 1.5rem;
		padding-bottom: 1rem;
	}

	.psy-form-header h2 {
		font-size: 1.35rem;
	}

	.psy-form-header p {
		font-size: 0.9rem;
	}

	.psy-form-field input,
	.psy-form-field select,
	.psy-form-field textarea {
		padding: 0.65rem 0.875rem;
		font-size: 0.95rem;
	}
}

/* =============================================================================
   Filter Forms (Future Enhancement)
   ========================================================================== */

.psy-filter-form {
	background: #f9f9f9;
	padding: 1.5rem;
	border-radius: 6px;
	margin-bottom: 2rem;
}

.psy-filter-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
	margin-bottom: 1rem;
}

.psy-filter-row:last-child {
	margin-bottom: 0;
}

/* =============================================================================
   Profile Cards (Future Enhancement)
   ========================================================================== */

.psy-profile-card {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	padding: 1.5rem;
	margin-bottom: 1.5rem;
	transition: box-shadow 0.2s;
}

.psy-profile-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.psy-profile-header {
	display: flex;
	align-items: center;
	margin-bottom: 1rem;
}

.psy-profile-avatar {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	object-fit: cover;
	margin-right: 1.25rem;
}

.psy-profile-info h3 {
	margin: 0 0 0.35rem;
	font-size: 1.25rem;
}

.psy-profile-info .title {
	color: #666;
	font-size: 0.95rem;
}

.psy-profile-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-top: 1rem;
}

.psy-profile-meta-item {
	display: flex;
	align-items: center;
	color: #555;
	font-size: 0.9rem;
}

.psy-badge {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	font-size: 0.8rem;
	font-weight: 600;
	border-radius: 12px;
	margin-right: 0.5rem;
}

.psy-badge-verified {
	background: #d4edda;
	color: #155724;
}

.psy-badge-featured {
	background: #fff3cd;
	color: #856404;
}

/* =============================================================================
   Utility Classes
   ========================================================================== */

.psy-text-center {
	text-align: center;
}

.psy-mt-1 {
	margin-top: 1rem;
}

.psy-mt-2 {
	margin-top: 2rem;
}

.psy-mb-1 {
	margin-bottom: 1rem;
}

.psy-mb-2 {
	margin-bottom: 2rem;
}

.psy-hidden {
	display: none !important;
}

.psy-loading-spinner {
	border: 3px solid #f3f3f3;
	border-top: 3px solid #0073aa;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	animation: spin 1s linear infinite;
	margin: 2rem auto;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/* =============================================================================
   Dashboard Enhancements
   ========================================================================== */

.psy-dashboard-wrapper {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.psy-dashboard-header {
	margin-bottom: 1.5rem;
}

.psy-dashboard-title {
	margin: 0 0 0.5rem;
	font-size: 1.5rem;
	font-weight: 600;
	color: #1d1d1d;
}

.psy-dashboard-status {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.psy-dashboard-messages {
	margin-bottom: 1.5rem;
	display: none;
}

.psy-dashboard-messages.show {
	display: block;
}

.psy-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.35rem 0.6rem;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.85rem;
}

.psy-badge-verified {
	background: #d4edda;
	color: #155724;
}

.psy-badge-warning {
	background: #fff3cd;
	color: #856404;
}

.psy-badge-featured {
	background: #fef3c7;
	color: #92400e;
}

.psy-checkbox-group {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.psy-checkbox-option {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
}

.psy-checkbox-option input[type="checkbox"] {
	margin: 0;
}

.psy-dashboard-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-bottom: 1.5rem;
}

.psy-btn-link {
	background: none;
	border: none;
	color: #0073aa;
	padding: 0;
	font-weight: 600;
}

.psy-btn-link:hover {
	text-decoration: underline;
	color: #005177;
}

.psy-dashboard-section {
	margin-top: 2rem;
}

.psy-dashboard-section h3 {
	margin-bottom: 0.35rem;
	font-size: 1.15rem;
	font-weight: 600;
}

.psy-section-hint {
	margin-bottom: 1rem;
	color: #6b7280;
	font-size: 0.9rem;
}

.psy-dashboard-repeater {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.psy-repeater-item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

.psy-input-flex {
	flex: 1;
	min-width: 200px;
}

.psy-input-small {
	width: 120px;
}

.psy-form-row-stack {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.psy-invite-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-top: 1rem;
}

.psy-invite-item {
	padding: 1rem;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #f9fafb;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: space-between;
}

.psy-invite-meta {
	font-size: 0.9rem;
	color: #4b5563;
}

.psy-invite-actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.psy-invite-messages {
	margin-top: 1rem;
	display: none;
}

.psy-invite-messages.show {
	display: block;
}

.psy-invite-empty {
	color: #6b7280;
	font-size: 0.9rem;
}

/* =============================================================================
   Filter Form & Listing
   ========================================================================== */

.psy-filter-form {
	margin-bottom: 2rem;
	padding: 1.5rem;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.psy-filter-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem 1.5rem;
	margin-bottom: 1.5rem;
}

.psy-filter-field label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 600;
	color: #1f2937;
}

.psy-filter-field select,
.psy-filter-field input {
	width: 100%;
	padding: 0.6rem 0.8rem;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 0.95rem;
}

.psy-filter-form .psy-form-submit {
	margin-top: 1rem;
}

.psy-list {
	margin-bottom: 2rem;
}

.psy-list-results {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 1.5rem;
}

.psy-profile-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.psy-profile-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.psy-profile-card__media {
	display: block;
}

.psy-profile-card__thumb {
	width: 100%;
	height: 180px;
	object-fit: cover;
}

.psy-profile-card__thumb.placeholder {
	background: #f3f4f6;
	display: block;
}

.psy-profile-card__body {
	padding: 1.25rem;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.psy-profile-card__badges {
	display: flex;
	gap: 0.5rem;
}

.psy-profile-card__title {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 700;
	color: #111827;
}

.psy-profile-card__title a {
	color: inherit;
	text-decoration: none;
}

.psy-profile-card__subtitle {
	margin: 0;
	color: #4b5563;
	font-size: 0.95rem;
}

.psy-profile-card__location {
	margin: 0;
	color: #4b5563;
	font-size: 0.9rem;
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

.psy-profile-card__excerpt {
	margin: 0;
	color: #6b7280;
	font-size: 0.9rem;
}

.psy-list-pagination {
	margin-top: 1.5rem;
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.psy-list-pagination a {
	padding: 0.4rem 0.75rem;
	border-radius: 6px;
	border: 1px solid #d1d5db;
	color: #1f2937;
	text-decoration: none;
}

.psy-list-pagination a.active,
.psy-list-pagination a:hover {
	background: #2563eb;
	border-color: #2563eb;
	color: #fff;
}

.psy-empty-state {
	margin: 1.5rem 0;
	color: #6b7280;
	font-size: 0.95rem;
}

.psy-list-clinic {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1.25rem;
}
