/**
 * HairAide Transformation Gallery Styles
 *
 * Brand Colors:
 *   Soft Pink: #E8B4B8
 *   Rose:      #D4919A
 *   Cream:     #FDF8F5
 *   Dark:      #2D2D2D
 */

/* ================================================================
   Shared: Reset & Typography
   ================================================================ */

#htg-gallery-app,
#htg-submit-app {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: #2D2D2D;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

#htg-gallery-app *,
#htg-submit-app * {
	box-sizing: border-box;
}

/* ================================================================
   Buttons
   ================================================================ */

.htg-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px;
	border: none;
	border-radius: 50px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	text-decoration: none;
	line-height: 1.4;
}

.htg-btn-primary {
	background: #D4919A;
	color: #fff;
}

.htg-btn-primary:hover {
	background: #c07a83;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(212, 145, 154, 0.4);
}

.htg-btn-secondary {
	background: #FDF8F5;
	color: #D4919A;
	border: 2px solid #E8B4B8;
}

.htg-btn-secondary:hover {
	background: #E8B4B8;
	color: #fff;
}

.htg-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

/* ================================================================
   Filter Bar
   ================================================================ */

.htg-filter-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 0;
	margin-bottom: 24px;
	border-bottom: 1px solid #f0e8e5;
}

.htg-filter-row {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	flex: 1;
}

.htg-filter-label {
	font-weight: 600;
	font-size: 14px;
	color: #666;
	white-space: nowrap;
}

.htg-filter-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.htg-pill {
	padding: 6px 16px;
	border-radius: 50px;
	border: 1.5px solid #E8B4B8;
	background: #fff;
	color: #D4919A;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
}

.htg-pill:hover {
	background: #FDF8F5;
}

.htg-pill-active {
	background: #D4919A;
	color: #fff;
	border-color: #D4919A;
}

.htg-pill-active:hover {
	background: #c07a83;
	border-color: #c07a83;
}

.htg-sort-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.htg-sort-row label {
	font-size: 14px;
	font-weight: 600;
	color: #666;
	white-space: nowrap;
}

.htg-sort-select {
	padding: 6px 12px;
	border-radius: 8px;
	border: 1.5px solid #E8B4B8;
	background: #fff;
	color: #2D2D2D;
	font-size: 14px;
	cursor: pointer;
}

/* ================================================================
   Gallery Grid
   ================================================================ */

.htg-gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
}

/* ================================================================
   Gallery Card
   ================================================================ */

.htg-card {
	position: relative;
	border-radius: 16px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	cursor: pointer;
}

.htg-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.htg-card-image {
	position: relative;
	padding-top: 120%;
	overflow: hidden;
}

.htg-card-image img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.htg-card:hover .htg-card-image img {
	transform: scale(1.03);
}

.htg-card-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	background: #D4919A;
	color: #fff;
	padding: 4px 12px;
	border-radius: 50px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.htg-card-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 40px 16px 16px;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
	color: #fff;
}

.htg-card-title {
	font-size: 16px;
	font-weight: 700;
	margin: 0 0 4px;
	font-family: 'Playfair Display', Georgia, serif;
}

.htg-card-salon {
	font-size: 12px;
	opacity: 0.85;
}

.htg-card-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 16px;
	border-top: 1px solid #f5f0ed;
}

.htg-card-votes {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	color: #D4919A;
	font-weight: 600;
}

.htg-card-cta {
	font-size: 13px;
	color: #D4919A;
	font-weight: 600;
	text-decoration: none;
}

.htg-card-cta:hover {
	text-decoration: underline;
}

/* ================================================================
   Loading & Empty States
   ================================================================ */

.htg-loading {
	grid-column: 1 / -1;
	text-align: center;
	padding: 48px 0;
	color: #999;
}

.htg-spinner {
	width: 40px;
	height: 40px;
	border: 3px solid #f0e8e5;
	border-top-color: #D4919A;
	border-radius: 50%;
	animation: htg-spin 0.8s linear infinite;
	margin: 0 auto 16px;
}

.htg-spinner-small {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: htg-spin 0.8s linear infinite;
	vertical-align: middle;
}

@keyframes htg-spin {
	to { transform: rotate(360deg); }
}

.htg-empty-state {
	text-align: center;
	padding: 64px 24px;
	color: #999;
}

.htg-empty-icon {
	font-size: 48px;
	color: #E8B4B8;
	margin-bottom: 16px;
}

.htg-empty-state h3 {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 24px;
	color: #2D2D2D;
	margin: 0 0 8px;
}

.htg-empty-state p {
	margin: 0 0 24px;
}

/* ================================================================
   Load More
   ================================================================ */

.htg-load-more-wrap {
	text-align: center;
	padding: 32px 0;
}

.htg-btn-load-more {
	background: #fff;
	color: #D4919A;
	border: 2px solid #E8B4B8;
	padding: 14px 40px;
	font-size: 15px;
}

.htg-btn-load-more:hover {
	background: #FDF8F5;
}

/* ================================================================
   Lightbox
   ================================================================ */

.htg-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.htg-lightbox-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.75);
	backdrop-filter: blur(4px);
}

.htg-lightbox-content {
	position: relative;
	background: #fff;
	border-radius: 20px;
	overflow: hidden;
	max-width: 960px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.htg-lightbox-close {
	position: absolute;
	top: 12px;
	right: 16px;
	z-index: 10;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	border: none;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	font-size: 22px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
	line-height: 1;
}

.htg-lightbox-close:hover {
	background: rgba(0, 0, 0, 0.7);
}

.htg-lightbox-body {
	display: flex;
	flex-direction: column;
}

@media (min-width: 768px) {
	.htg-lightbox-body {
		flex-direction: row;
	}
}

/* ================================================================
   Before/After Slider
   ================================================================ */

.htg-slider-container {
	flex: 1;
	min-width: 0;
}

.htg-slider-wrap {
	position: relative;
	width: 100%;
	overflow: hidden;
	cursor: ew-resize;
	user-select: none;
	-webkit-user-select: none;
}

.htg-slider-img {
	display: block;
	width: 100%;
	height: auto;
}

.htg-slider-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 50%;
	height: 100%;
	overflow: hidden;
}

.htg-slider-overlay img {
	width: 0;
	min-width: 0;
	height: 100%;
	object-fit: cover;
	position: absolute;
	top: 0;
	left: 0;
}

.htg-slider-handle {
	position: absolute;
	top: 0;
	left: 50%;
	width: 4px;
	height: 100%;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	z-index: 5;
}

.htg-slider-line {
	flex: 1;
	width: 3px;
	background: #fff;
	box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.htg-slider-knob {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.htg-slider-arrows {
	color: #D4919A;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 4px;
}

.htg-slider-labels {
	display: flex;
	justify-content: space-between;
	padding: 8px 16px;
	background: #FDF8F5;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: #999;
}

/* ================================================================
   Lightbox Details
   ================================================================ */

.htg-lightbox-details {
	padding: 32px 28px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

@media (min-width: 768px) {
	.htg-lightbox-details {
		width: 320px;
		flex-shrink: 0;
	}
}

.htg-lb-title {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 24px;
	margin: 0;
	color: #2D2D2D;
}

.htg-lb-meta {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.htg-lb-meta-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
	border-bottom: 1px solid #f5f0ed;
}

.htg-lb-meta-label {
	font-size: 13px;
	color: #999;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.htg-lb-meta-value {
	font-size: 14px;
	font-weight: 600;
	color: #2D2D2D;
}

.htg-lb-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.htg-btn-vote {
	background: #FDF8F5;
	border: 2px solid #E8B4B8;
	color: #D4919A;
	padding: 10px 20px;
	border-radius: 50px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.2s;
}

.htg-btn-vote:hover {
	background: #E8B4B8;
	color: #fff;
}

.htg-btn-vote.htg-voted {
	background: #D4919A;
	border-color: #D4919A;
	color: #fff;
}

.htg-vote-icon {
	font-size: 16px;
}

.htg-btn-tryon {
	background: #D4919A;
	color: #fff;
	padding: 10px 20px;
	border-radius: 50px;
	font-weight: 700;
	text-decoration: none;
	transition: all 0.2s;
	font-size: 14px;
}

.htg-btn-tryon:hover {
	background: #c07a83;
	color: #fff;
}

.htg-cta-submit {
	display: block;
	text-align: center;
	padding: 12px;
	background: #FDF8F5;
	border-radius: 12px;
	color: #D4919A;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	margin-top: auto;
}

.htg-cta-submit:hover {
	background: #f5e8e3;
}

/* ================================================================
   Submission Form
   ================================================================ */

.htg-submit-wrapper {
	max-width: 720px;
	margin: 0 auto;
}

.htg-submit-form {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.htg-form-intro {
	text-align: center;
	padding-bottom: 8px;
}

.htg-form-intro h2 {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 28px;
	color: #2D2D2D;
	margin: 0 0 8px;
}

.htg-form-intro p {
	color: #666;
	font-size: 16px;
	margin: 0;
}

.htg-form-section {
	background: #fff;
	border: 1px solid #f0e8e5;
	border-radius: 16px;
	padding: 28px;
}

.htg-section-title {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 20px;
	color: #2D2D2D;
	margin: 0 0 20px;
	padding-bottom: 12px;
	border-bottom: 2px solid #FDF8F5;
}

/* ================================================================
   Upload Boxes
   ================================================================ */

.htg-upload-grid {
	display: flex;
	gap: 16px;
	align-items: center;
	justify-content: center;
}

.htg-upload-box {
	flex: 1;
	position: relative;
	max-width: 260px;
}

.htg-file-input {
	position: absolute;
	width: 0;
	height: 0;
	opacity: 0;
	pointer-events: none;
}

.htg-upload-label {
	display: block;
	border: 2px dashed #E8B4B8;
	border-radius: 16px;
	padding: 32px 16px;
	text-align: center;
	cursor: pointer;
	transition: all 0.2s;
	background: #FDF8F5;
	min-height: 200px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	overflow: hidden;
}

.htg-upload-label:hover {
	border-color: #D4919A;
	background: #f9f0ed;
}

.htg-upload-label.htg-has-file {
	border-style: solid;
	border-color: #D4919A;
	padding: 0;
}

.htg-upload-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.htg-upload-icon {
	margin-bottom: 4px;
}

.htg-upload-text {
	font-weight: 700;
	color: #D4919A;
	font-size: 15px;
}

.htg-upload-hint {
	font-size: 12px;
	color: #999;
}

.htg-upload-preview {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 14px;
	min-height: 200px;
}

.htg-upload-remove {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 5;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	border: none;
	font-size: 18px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.htg-upload-remove:hover {
	background: rgba(0, 0, 0, 0.8);
}

.htg-upload-arrow {
	flex-shrink: 0;
	display: flex;
	align-items: center;
}

.htg-upload-note {
	text-align: center;
	font-size: 12px;
	color: #999;
	margin: 12px 0 0;
}

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

.htg-field {
	margin-bottom: 20px;
}

.htg-field:last-child {
	margin-bottom: 0;
}

.htg-field-row {
	display: flex;
	gap: 16px;
}

.htg-field-row .htg-field {
	flex: 1;
}

.htg-field-label {
	display: block;
	font-weight: 600;
	font-size: 14px;
	color: #2D2D2D;
	margin-bottom: 6px;
}

.htg-required {
	color: #D4919A;
}

.htg-optional {
	font-weight: 400;
	color: #999;
	font-size: 12px;
}

.htg-input {
	width: 100%;
	padding: 12px 16px;
	border: 1.5px solid #e0d8d5;
	border-radius: 12px;
	font-size: 15px;
	transition: border-color 0.2s, box-shadow 0.2s;
	background: #fff;
	font-family: inherit;
	color: #2D2D2D;
}

.htg-input:focus {
	outline: none;
	border-color: #D4919A;
	box-shadow: 0 0 0 3px rgba(212, 145, 154, 0.15);
}

.htg-input::placeholder {
	color: #bbb;
}

.htg-field-hint {
	font-size: 12px;
	color: #999;
	margin: 4px 0 0;
}

/* ================================================================
   Consent
   ================================================================ */

.htg-consent-box {
	background: #FDF8F5;
	border-radius: 12px;
	padding: 20px;
}

.htg-checkbox-label {
	display: flex;
	gap: 12px;
	cursor: pointer;
	align-items: flex-start;
}

.htg-checkbox-label input[type="checkbox"] {
	margin-top: 3px;
	width: 18px;
	height: 18px;
	accent-color: #D4919A;
	flex-shrink: 0;
}

.htg-checkbox-text {
	font-size: 14px;
	color: #555;
	line-height: 1.5;
}

.htg-checkbox-text a {
	color: #D4919A;
	text-decoration: underline;
}

/* ================================================================
   Form Error
   ================================================================ */

.htg-form-error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 12px;
	padding: 12px 16px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.htg-error-icon {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #ef4444;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 700;
	flex-shrink: 0;
}

.htg-error-text {
	font-size: 14px;
	color: #dc2626;
}

/* ================================================================
   Form Actions
   ================================================================ */

.htg-form-actions {
	text-align: center;
}

.htg-btn-submit {
	padding: 16px 48px;
	font-size: 17px;
}

/* ================================================================
   Success State
   ================================================================ */

.htg-submit-success {
	text-align: center;
	padding: 64px 24px;
}

.htg-success-icon {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: #D4919A;
	color: #fff;
	font-size: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 24px;
}

.htg-submit-success h2 {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 32px;
	color: #2D2D2D;
	margin: 0 0 12px;
}

.htg-submit-success p {
	font-size: 16px;
	color: #666;
	margin: 0 0 32px;
	max-width: 480px;
	margin-left: auto;
	margin-right: auto;
}

.htg-success-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

/* ================================================================
   Photo Release Terms
   ================================================================ */

.htg-terms-panel {
	margin-top: 32px;
	background: #FDF8F5;
	border: 1px solid #f0e8e5;
	border-radius: 16px;
	overflow: hidden;
}

.htg-terms-content {
	padding: 32px;
}

.htg-terms-content h3 {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 22px;
	color: #2D2D2D;
	margin: 0 0 12px;
}

.htg-terms-content ol {
	padding-left: 20px;
}

.htg-terms-content li {
	margin-bottom: 12px;
	font-size: 14px;
	color: #555;
	line-height: 1.6;
}

.htg-terms-close {
	margin-top: 16px;
}

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

@media (max-width: 768px) {
	.htg-gallery-grid {
		grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
		gap: 12px;
	}

	.htg-card-footer {
		padding: 8px 12px;
	}

	.htg-card-title {
		font-size: 14px;
	}

	.htg-filter-bar {
		flex-direction: column;
		align-items: flex-start;
	}

	.htg-filter-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.htg-lightbox {
		padding: 8px;
	}

	.htg-lightbox-content {
		border-radius: 16px;
	}

	.htg-lightbox-details {
		padding: 24px 20px;
	}

	.htg-lb-title {
		font-size: 20px;
	}

	.htg-upload-grid {
		flex-direction: column;
	}

	.htg-upload-box {
		max-width: 100%;
		width: 100%;
	}

	.htg-upload-arrow {
		transform: rotate(90deg);
	}

	.htg-field-row {
		flex-direction: column;
		gap: 0;
	}

	.htg-form-section {
		padding: 20px 16px;
	}

	.htg-form-intro h2 {
		font-size: 24px;
	}

	.htg-btn-submit {
		width: 100%;
	}
}

@media (max-width: 480px) {
	.htg-gallery-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 8px;
	}

	.htg-card {
		border-radius: 12px;
	}

	.htg-card-overlay {
		padding: 24px 10px 10px;
	}

	.htg-card-title {
		font-size: 13px;
	}

	.htg-card-salon {
		font-size: 11px;
	}

	.htg-card-footer {
		padding: 6px 10px;
		font-size: 12px;
	}
}
