/**
 * GoodChoice — User Profile Styles
 *
 * Styles for /my-profile/ front-end pages, tabbed layout.
 *
 * @package GoodChoice
 */

/* =================================================================
 * Layout Wrapper
 * ================================================================= */

.gc-profile-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

.gc-profile {
	font-family: inherit;
	line-height: 1.6;
}

.gc-profile__title {
	font-size: 1.6em;
	font-weight: 700;
	margin: 0 0 24px;
}

/* =================================================================
 * Tab Navigation
 * ================================================================= */

.gc-profile__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	border-bottom: 2px solid #e2e4e7;
	margin-bottom: 28px;
	padding: 0;
}

.gc-profile__tab {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 12px 18px;
	text-decoration: none;
	color: #555d66;
	font-weight: 500;
	font-size: 0.95em;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
	white-space: nowrap;
}

.gc-profile__tab:hover:not(.gc-profile__tab--disabled) {
	color: #0073aa;
	background: rgba(0, 115, 170, 0.04);
}

.gc-profile__tab--active {
	color: #0073aa;
	border-bottom-color: #0073aa;
	font-weight: 600;
}

/* Disabled tab (Health) */
.gc-profile__tab--disabled {
	color: #a7aaad;
	cursor: not-allowed;
	opacity: 0.55;
	pointer-events: auto; /* keep for title tooltip */
}

.gc-profile__tab--disabled:hover {
	color: #a7aaad;
	background: none;
}

.gc-profile__tab-icon {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.gc-profile__tab-label {
	line-height: 1;
}

/* =================================================================
 * Tab Body / Sections
 * ================================================================= */

.gc-profile__body {
	min-height: 300px;
}

.gc-profile__section {
	animation: gcFadeIn 0.3s ease;
}

@keyframes gcFadeIn {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

.gc-profile__section h2 {
	font-size: 1.4em;
	font-weight: 600;
	margin: 0 0 16px;
}

.gc-profile__section h3 {
	font-size: 1.1em;
	font-weight: 600;
	margin: 24px 0 10px;
}

.gc-profile__section h3:first-child {
	margin-top: 0;
}

.gc-profile__description {
	color: #666;
	font-size: 0.92em;
	margin: 0 0 16px;
}

.gc-profile__description a {
	color: #0073aa;
}

.gc-profile__section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 20px;
}

.gc-profile__section-header h2 {
	margin: 0;
}

/* =================================================================
 * Empty States
 * ================================================================= */

.gc-profile__empty {
	text-align: center;
	padding: 50px 20px;
	background: #f9f9f9;
	border: 1px dashed #ddd;
	border-radius: 8px;
	color: #666;
}

.gc-profile__empty p {
	font-size: 1.05em;
	margin: 0 0 16px;
}

.gc-profile__empty-inline {
	color: #999;
	font-style: italic;
	padding: 12px 0;
}

/* =================================================================
 * Recipe Grid
 * ================================================================= */

.gc-profile__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
}

/* =================================================================
 * Recipe Card
 * ================================================================= */

.gc-recipe-card {
	position: relative;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gc-recipe-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.gc-recipe-card__thumb-link {
	display: block;
	width: 100%;
	height: 200px;
	overflow: hidden;
}

.gc-recipe-card__thumb-link img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.gc-recipe-card:hover .gc-recipe-card__thumb-link img {
	transform: scale(1.04);
}

.gc-recipe-card__thumb-link--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f0f0f1;
	color: #a7aaad;
}

.gc-recipe-card__thumb-link--placeholder .dashicons {
	font-size: 48px;
	width: 48px;
	height: 48px;
}

.gc-recipe-card__body {
	padding: 16px;
}

.gc-recipe-card__title {
	font-size: 1.05em;
	font-weight: 600;
	margin: 0 0 8px;
	line-height: 1.4;
}

.gc-recipe-card__title a {
	color: inherit;
	text-decoration: none;
}

.gc-recipe-card__title a:hover {
	color: #0073aa;
}

.gc-recipe-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	color: #666;
	font-size: 0.85em;
	margin-bottom: 8px;
}

.gc-recipe-card__meta-item {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.gc-recipe-card__meta-item .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
}

.gc-recipe-card__status {
	display: inline-block;
	padding: 2px 8px;
	font-size: 0.75em;
	font-weight: 600;
	text-transform: uppercase;
	border-radius: 3px;
	letter-spacing: 0.04em;
}

.gc-recipe-card__status--draft {
	background: #f0f0f1;
	color: #50575e;
}

.gc-recipe-card__status--pending {
	background: #fff3cd;
	color: #856404;
}

/* =================================================================
 * Likes / Dislikes — 3-Column Card Grid
 * ================================================================= */

.gc-profile__prefs-form {
	max-width: 1000px;
}

.gc-profile__prefs-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	margin-bottom: 24px;
}

.gc-profile__pref-card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid #e2e4e7;
	border-radius: 8px;
	transition: box-shadow 0.15s, border-color 0.15s;
}

.gc-profile__pref-card:hover {
	border-color: #c3c4c7;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.gc-profile__pref-name {
	font-weight: 600;
	font-size: 0.95em;
	color: #1d2327;
}

.gc-profile__pref-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.gc-profile__pref-toggle {
	display: flex;
	align-items: center;
	gap: 5px;
	cursor: pointer;
	font-size: 0.82em;
	color: #555;
	padding: 3px 8px;
	border-radius: 4px;
	transition: background 0.15s;
}

.gc-profile__pref-toggle:hover {
	background: rgba(0, 0, 0, 0.04);
}

.gc-profile__pref-toggle input[type="checkbox"] {
	width: 16px;
	height: 16px;
	cursor: pointer;
}

.gc-profile__pref-toggle--like input[type="checkbox"] {
	accent-color: #00a32a;
}

.gc-profile__pref-toggle--dislike input[type="checkbox"] {
	accent-color: #d63638;
}

.gc-profile__pref-toggle--allergy input[type="checkbox"] {
	accent-color: #b75a1b;
}

/* =================================================================
 * Settings
 * ================================================================= */

.gc-profile__info-card {
	background: #f7f7f7;
	border: 1px solid #e2e4e7;
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 24px;
}

.gc-profile__info-table {
	width: auto;
	border-collapse: collapse;
}

.gc-profile__info-table th {
	text-align: left;
	font-weight: 600;
	padding: 6px 20px 6px 0;
	color: #555;
	white-space: nowrap;
}

.gc-profile__info-table td {
	padding: 6px 0;
}

.gc-profile__settings-form {
	max-width: 600px;
	margin-top: 8px;
}

.gc-profile__setting-row {
	padding: 14px 0;
	border-bottom: 1px solid #f0f0f1;
}

.gc-profile__setting-row:last-of-type {
	border-bottom: none;
}

.gc-profile__toggle-label {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	cursor: pointer;
}

.gc-profile__toggle-label input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin-top: 2px;
	accent-color: #0073aa;
	flex-shrink: 0;
}

.gc-profile__toggle-text strong {
	display: block;
	margin-bottom: 2px;
}

.gc-profile__toggle-desc {
	color: #666;
	font-size: 0.88em;
}

/* =================================================================
 * Health Tab (disabled/greyed out)
 * ================================================================= */

.gc-profile__health-disabled {
	opacity: 0.5;
	pointer-events: none;
	user-select: none;
}

.gc-profile__placeholder {
	text-align: center;
	padding: 60px 20px;
	background: #f9f9f9;
	border: 2px dashed #ddd;
	border-radius: 12px;
}

.gc-profile__placeholder-icon {
	font-size: 48px;
	width: 48px;
	height: 48px;
	color: #a7aaad;
	margin-bottom: 12px;
}

.gc-profile__placeholder h2 {
	color: #999;
}

.gc-profile__placeholder p {
	color: #999;
	max-width: 400px;
	margin: 0 auto;
}

/* =================================================================
 * Recipe Editor Mount
 * ================================================================= */

.gc-recipe-editor-mount {
	min-height: 400px;
	border: 1px solid #e2e4e7;
	border-radius: 8px;
	padding: 20px;
	background: #fff;
}

.gc-editor-loading {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 40px;
	justify-content: center;
	color: #666;
}

.gc-editor-loading .spinner {
	float: none;
}

/* =================================================================
 * Membership Gate
 * ================================================================= */

.gc-membership-gate {
	text-align: center;
	padding: 40px 20px;
	background: #f9f9f9;
	border: 1px dashed #ccc;
	border-radius: 8px;
}

.gc-membership-gate p {
	font-size: 1.05em;
	color: #666;
	margin: 0 0 16px;
}

/* =================================================================
 * Buttons
 * ================================================================= */

.gc-btn {
	display: inline-block;
	padding: 10px 22px;
	border: none;
	border-radius: 5px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	line-height: 1.4;
	transition: background 0.2s ease, transform 0.1s ease;
}

.gc-btn:active {
	transform: scale(0.97);
}

.gc-btn--primary {
	background: #0073aa;
	color: #fff;
}

.gc-btn--primary:hover {
	background: #005c8a;
	color: #fff;
}

.gc-btn--secondary {
	background: #f0f0f1;
	color: #1d2327;
}

.gc-btn--secondary:hover {
	background: #dcdcde;
}

.gc-btn--sm {
	padding: 6px 14px;
	font-size: 13px;
}

.gc-btn:disabled,
.gc-btn.is-loading {
	opacity: 0.6;
	cursor: not-allowed;
}

/* =================================================================
 * Form Actions
 * ================================================================= */

.gc-profile__form-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 20px;
	padding-top: 16px;
}

.gc-save-status {
	font-size: 0.9em;
	font-weight: 500;
	transition: opacity 0.3s;
}

.gc-save-status--success {
	color: #00a32a;
}

.gc-save-status--error {
	color: #d63638;
}

.gc-save-status--saving {
	color: #996800;
}

/* =================================================================
 * Inline Notices
 * ================================================================= */

.gc-inline-notice {
	padding: 10px 16px;
	border-radius: 4px;
	font-size: 0.92em;
	margin-bottom: 16px;
	animation: gcFadeIn 0.3s ease;
}

.gc-inline-notice--success {
	background: #ecf7ed;
	color: #00a32a;
	border: 1px solid #b8e6bf;
}

.gc-inline-notice--error {
	background: #fcf0f1;
	color: #d63638;
	border: 1px solid #f0c0c1;
}

/* =================================================================
 * Pagination
 * ================================================================= */

.gc-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
	margin-top: 30px;
	flex-wrap: wrap;
}

.gc-pagination__link {
	display: inline-block;
	padding: 8px 14px;
	border: 1px solid #ddd;
	border-radius: 4px;
	text-decoration: none;
	color: #555;
	font-size: 0.9em;
	transition: background 0.15s, border-color 0.15s;
}

.gc-pagination__link:hover {
	background: #f0f0f1;
	border-color: #c3c4c7;
}

.gc-pagination__link--current {
	background: #0073aa;
	color: #fff;
	border-color: #0073aa;
	font-weight: 600;
}

/* =================================================================
 * Responsive
 * ================================================================= */

@media (max-width: 768px) {
	.gc-profile__tabs {
		gap: 0;
	}

	.gc-profile__tab {
		padding: 10px 12px;
		font-size: 0.85em;
	}

	.gc-profile__tab-icon {
		display: none;
	}

	.gc-profile__grid {
		grid-template-columns: 1fr;
	}

	.gc-profile__prefs-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.gc-profile__section-header {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (max-width: 480px) {
	.gc-profile-wrap {
		padding: 12px;
	}

	.gc-profile__tab {
		padding: 8px 10px;
		font-size: 0.8em;
	}

	.gc-profile__prefs-grid {
		grid-template-columns: 1fr;
	}

	.gc-recipe-card__thumb-link {
		height: 160px;
	}
}

/* =================================================================
 * Login Message (shortcode fallback)
 * ================================================================= */

.gc-profile-login-msg {
	text-align: center;
	padding: 30px;
	color: #666;
	font-size: 1.05em;
}
