/* ==========================================================================
   Tizzleshop Gift Registry - Shared Component Design System
   ========================================================================== */

/* --------------------------------------------------------------------------
   SHARED COMPONENT: RESET (applied inside any page context)
   -------------------------------------------------------------------------- */
.tsgr-public-page,
.tsgr-public-page *,
.tsgr-public-page *::before,
.tsgr-public-page *::after,
.tsgr-account-page,
.tsgr-account-page *,
.tsgr-account-page *::before,
.tsgr-account-page *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

.tsgr-public-page img,
.tsgr-account-page img {
	max-width: none;
	width: auto;
	height: auto;
	border: 0;
	vertical-align: middle;
}

.tsgr-public-page a,
.tsgr-account-page a {
	text-decoration: none;
	color: inherit;
}

.tsgr-public-page button,
.tsgr-account-page button {
	border: none;
	background: none;
	cursor: pointer;
	font-family: inherit;
}

.tsgr-public-page h1,
.tsgr-public-page h2,
.tsgr-public-page h3,
.tsgr-account-page h1,
.tsgr-account-page h2,
.tsgr-account-page h3 {
	font-weight: normal;
	line-height: 1.2;
}

.tsgr-public-page p,
.tsgr-account-page p {
	margin: 0;
}

.tsgr-public-page ul,
.tsgr-public-page ol,
.tsgr-account-page ul,
.tsgr-account-page ol {
	list-style: none;
}

/* --------------------------------------------------------------------------
   SHARED COMPONENT: CARD
   -------------------------------------------------------------------------- */
.tsgr-card {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 12px;
	padding: 12px;
	background: #ffffff;
	border-radius: 8px;
	margin-bottom: 8px;
	border: 1px solid #e7e7e7;
	box-shadow: 0 1px 2px rgba(0,0,0,0.04);
	position: relative;
}

.tsgr-card:last-child {
	margin-bottom: 0;
}

/* Purchased state */
.tsgr-card.tsgr-purchased {
	opacity: 0.6;
}

.tsgr-card.tsgr-purchased .tsgr-item-name {
	text-decoration: line-through;
}

/* --------------------------------------------------------------------------
   SHARED COMPONENT: IMAGE AREA
   UNIFIED: Same treatment in both public and account contexts.
   The image fills the frame completely. No grey placeholder visible behind.
   -------------------------------------------------------------------------- */
.tsgr-item-image {
	width: 90px;
	height: 90px;
	flex-shrink: 0;
	flex-grow: 0;
	border-radius: 6px;
	overflow: hidden;
	background: #f8f8f8;
	display: flex;
	align-items: center;
	justify-content: center;
}

.tsgr-item-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tsgr-no-image {
	width: 100%;
	height: 100%;
	background: #f0f0f0;
}

/* --------------------------------------------------------------------------
   SHARED COMPONENT: CONTENT AREA
   -------------------------------------------------------------------------- */
.tsgr-item-content {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.tsgr-item-name {
	font-size: 15px;
	font-weight: 600;
	color: #0f1111;
	line-height: 1.3;
	margin: 0 0 4px 0;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.tsgr-item-meta {
	font-size: 13px;
	color: #565959;
	margin: 0 0 6px 0;
}

.tsgr-item-note {
	font-size: 13px;
	color: #565959;
	font-style: italic;
	margin: 0 0 8px 0;
	line-height: 1.4;
}

.tsgr-item-price {
	font-size: 14px;
	font-weight: 600;
	color: #0f1111;
	margin: 0 0 6px 0;
}

/* --------------------------------------------------------------------------
   SHARED COMPONENT: ACTION AREA
   -------------------------------------------------------------------------- */
.tsgr-item-action {
	margin-top: auto;
	padding-top: 8px;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
}

/* --------------------------------------------------------------------------
   SHARED COMPONENT: BUTTONS
   -------------------------------------------------------------------------- */
.tsgr-btn {
	display: inline-block;
	padding: 10px 16px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	cursor: pointer;
	transition: background-color 0.15s ease;
	line-height: 1.4;
	border: 1px solid transparent;
}

/* MAXIMUM SPECIFICITY: Override any theme */
html body.tsgr-account-page button.tsgr-btn-yellow,
html body.tsgr-public-page button.tsgr-btn-yellow,
html body.tsgr-account-page .tsgr-btn-yellow,
html body.tsgr-public-page .tsgr-btn-yellow,
html body.tsgr-account-page a.tsgr-btn-yellow,
html body.tsgr-public-page a.tsgr-btn-yellow,
.tsgr-btn-yellow {
	background-color: #FF9900 !important;
	border-color: #e68a00 !important;
	color: #0f1111 !important;
	background-image: none !important;
}

html body.tsgr-account-page button.tsgr-btn-yellow:hover,
html body.tsgr-public-page button.tsgr-btn-yellow:hover,
html body.tsgr-account-page .tsgr-btn-yellow:hover,
html body.tsgr-public-page .tsgr-btn-yellow:hover,
.tsgr-btn-yellow:hover {
	background-color: #e68a00 !important;
	background-image: none !important;
}

html body.tsgr-account-page button.tsgr-btn-yellow:active,
html body.tsgr-public-page button.tsgr-btn-yellow:active,
html body.tsgr-account-page .tsgr-btn-yellow:active,
html body.tsgr-public-page .tsgr-btn-yellow:active,
.tsgr-btn-yellow:active {
	background-color: #cc7a00 !important;
	background-image: none !important;
}

.tsgr-btn-secondary {
	background: #ffffff;
	border-color: #d5d9d9;
	color: #0f1111;
}

.tsgr-btn-secondary:hover {
	background: #f7fafa;
}

.tsgr-btn-danger {
	background: #ffffff;
	border-color: #d5d9d9;
	color: #b12704;
}

.tsgr-btn-danger:hover {
	background: #fff0f0;
}

.tsgr-btn-small {
	padding: 6px 12px;
	font-size: 13px;
	border-radius: 6px;
}

/* --------------------------------------------------------------------------
   SHARED COMPONENT: BADGES
   -------------------------------------------------------------------------- */
.tsgr-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 3px;
	font-size: 12px;
	font-weight: 600;
}

.tsgr-badge-bought {
	background: #565959;
	color: #ffffff;
}

.tsgr-badge-held {
	background: #b12704;
	color: #ffffff;
}

.tsgr-badge-priority-high {
	background: #fff3cd;
	color: #856404;
}

.tsgr-badge-priority-low {
	background: #e2e3e5;
	color: #383d41;
}

/* --------------------------------------------------------------------------
   SHARED COMPONENT: TAGS
   -------------------------------------------------------------------------- */
.tsgr-tag {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 3px;
	font-size: 12px;
	background: #f3f3f3;
	color: #565959;
	margin-right: 4px;
	margin-bottom: 4px;
}

/* --------------------------------------------------------------------------
   SHARED COMPONENT: NOTICES
   -------------------------------------------------------------------------- */
.tsgr-notice {
	padding: 10px 14px;
	border-radius: 4px;
	margin-bottom: 12px;
	font-size: 14px;
}

.tsgr-notice-success {
	background: #d4edda;
	color: #155724;
}

.tsgr-notice-error {
	background: #fff0f0;
	color: #b12704;
}

/* --------------------------------------------------------------------------
   SHARED COMPONENT: EMPTY STATE
   -------------------------------------------------------------------------- */
.tsgr-empty {
	padding: 40px 24px;
	text-align: center;
	color: #565959;
	font-size: 15px;
	background: #ffffff;
	border-radius: 8px;
	border: 1px solid #e7e7e7;
}

.tsgr-empty p {
	margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   SHARED COMPONENT: SECTION HEADER
   -------------------------------------------------------------------------- */
.tsgr-section-header {
	font-size: 16px;
	font-weight: 700;
	color: #0f1111;
	margin: 24px 0 12px 0;
	padding-bottom: 8px;
	border-bottom: 1px solid #e7e7e7;
}

/* --------------------------------------------------------------------------
   SHARED COMPONENT: PRIVACY BADGE
   -------------------------------------------------------------------------- */
.tsgr-privacy {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 12px;
	font-size: 11px;
	text-transform: uppercase;
	font-weight: 700;
}

.tsgr-privacy-public { background: #d4edda; color: #155724; }
.tsgr-privacy-private { background: #f8d7da; color: #721c24; }
.tsgr-privacy-password { background: #fff3cd; color: #856404; }
.tsgr-privacy-friends-only { background: #cce5ff; color: #004085; }


/* --------------------------------------------------------------------------
   SHARED COMPONENT: COVER IMAGE
   Strict 3:1 aspect ratio, cropped display (Amazon-style banner)
   Uses modern aspect-ratio with padding-bottom fallback
   -------------------------------------------------------------------------- */
.tsgr-cover-wrap,
button.tsgr-cover-wrap {
	width: 100%;
	position: relative;
	overflow: hidden;
	border-radius: 8px 8px 0 0;
	background: #f0f0f0;
	/* Modern browsers: native aspect-ratio */
	aspect-ratio: 3 / 1;
	/* Fallback: min/max height constraints */
	min-height: 120px;
	max-height: 200px;
	display: block;
	border: none;
	padding: 0;
	margin: 0;
	font-family: inherit;
	font-size: inherit;
	color: inherit;
	text-align: left;
}

/* Fallback for older browsers: padding hack */
@supports not (aspect-ratio: 3 / 1) {
	.tsgr-cover-wrap {
		height: 0;
		padding-bottom: 33.333%;
		min-height: auto;
	}
}

.tsgr-cover-image {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

/* Editable: show cursor and edit hint on hover */
.tsgr-cover-wrap--editable,
button.tsgr-cover-wrap--editable {
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	position: relative;
	display: block;
	border: none;
	padding: 0;
	margin: 0;
	font-family: inherit;
	font-size: inherit;
	color: inherit;
	text-align: left;
}

/* Transparent button overlay that captures ALL taps */
.tsgr-cover-btn {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 10;
	background: transparent;
	border: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.tsgr-cover-btn:focus {
	outline: none;
}

.tsgr-cover-wrap--editable:hover .tsgr-cover-edit-hint {
	opacity: 1;
}

/* Placeholder state when no cover set */
.tsgr-cover-image--placeholder {
	background: #e7e7e7;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Make placeholder look more like a button/tap target */
.tsgr-cover-wrap--editable .tsgr-cover-image--placeholder {
	background: #d5d9d9;
	border: 2px dashed #a6a6a6;
}

.tsgr-cover-wrap--editable:active .tsgr-cover-image--placeholder {
	background: #c3c4c7;
}

.tsgr-cover-placeholder-text {
	font-size: 14px;
	color: #565959;
	font-weight: 500;
}

/* Edit hint overlay */
.tsgr-cover-edit-hint {
	position: absolute;
	bottom: 8px;
	right: 8px;
	background: rgba(0, 0, 0, 0.6);
	color: #ffffff;
	padding: 4px 10px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	opacity: 0;
	transition: opacity 0.2s ease;
	pointer-events: none;
}

.tsgr-cover-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 60%;
	background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.4));
	pointer-events: none;
}

/* --------------------------------------------------------------------------
   COVER IMAGE SELECTOR (Settings tab)
   -------------------------------------------------------------------------- */
.tsgr-cover-selector {
	flex: 1;
	min-width: 0;
}

.tsgr-preset-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 8px;
	margin-bottom: 12px;
}

.tsgr-preset-item {
	position: relative;
	cursor: pointer;
	border-radius: 6px;
	overflow: hidden;
	border: 2px solid transparent;
	transition: border-color 0.15s ease;
	/* Fixed frame: image fills container, overflow hidden */
	aspect-ratio: 3 / 1;
	background: #f0f0f0;
}

/* Fallback for older browsers */
@supports not (aspect-ratio: 3 / 1) {
	.tsgr-preset-item {
		height: 80px;
	}
}

.tsgr-preset-item:hover {
	border-color: #FF9900;
}

.tsgr-preset-item--selected {
	border-color: #FF9900;
	box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.2);
}

.tsgr-preset-item input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.tsgr-preset-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	position: absolute;
	top: 0;
	left: 0;
}

.tsgr-preset-item span {
	display: block;
	padding: 4px 6px;
	font-size: 11px;
	font-weight: 600;
	color: #0f1111;
	background: #f8f8f8;
	text-align: center;
}

.tsgr-preset-item--admin {
	border-color: #007185;
}

.tsgr-preset-item--admin span {
	background: #e6f4f1;
	color: #007185;
}

/* --------------------------------------------------------------------------
   CREATE WISHLIST MODAL
   -------------------------------------------------------------------------- */
.tsgr-modal {
	display: none;
	position: fixed;
	z-index: 9999;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.tsgr-modal__overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
}

.tsgr-modal__content {
	position: relative;
	z-index: 1;
	background: #ffffff;
	border-radius: 8px;
	max-width: 480px;
	width: calc(100% - 32px);
	margin: 40px auto;
	max-height: calc(100vh - 80px);
	overflow-y: auto;
	box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.tsgr-modal__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	border-bottom: 1px solid #e7e7e7;
}

.tsgr-modal__header h2 {
	font-size: 18px;
	font-weight: 700;
	margin: 0;
}

.tsgr-modal__close {
	font-size: 24px;
	line-height: 1;
	color: #565959;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
}

.tsgr-modal__close:hover {
	background: #f3f3f3;
}

.tsgr-modal__content form {
	padding: 20px;
}

.tsgr-modal__content .tsgr-form-row--cover {
	flex-direction: column;
	gap: 8px;
}

.tsgr-modal__content .tsgr-form-row--cover .tsgr-form-label {
	padding-top: 0;
}

/* --------------------------------------------------------------------------
   COVER IMAGE SELECTOR
   -------------------------------------------------------------------------- */
.tsgr-cover-selector {
	flex: 1;
	min-width: 0;
}

.tsgr-preset-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 8px;
	margin-bottom: 12px;
}

.tsgr-preset-item {
	position: relative;
	cursor: pointer;
	border-radius: 6px;
	overflow: hidden;
	border: 2px solid transparent;
	transition: border-color 0.15s ease;
	/* Fixed frame: image fills container, overflow hidden */
	aspect-ratio: 3 / 1;
	background: #f0f0f0;
}

/* Fallback for older browsers */
@supports not (aspect-ratio: 3 / 1) {
	.tsgr-preset-item {
		height: 80px;
	}
}

.tsgr-preset-item:hover {
	border-color: #FF9900;
}

.tsgr-preset-item--selected {
	border-color: #FF9900;
	box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.2);
}

.tsgr-preset-item input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.tsgr-preset-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	position: absolute;
	top: 0;
	left: 0;
}

.tsgr-preset-item span {
	display: block;
	padding: 4px 6px;
	font-size: 11px;
	font-weight: 600;
	color: #0f1111;
	background: #f8f8f8;
	text-align: center;
}

.tsgr-preset-item--admin {
	border-color: #007185;
}

.tsgr-preset-item--admin span {
	background: #e6f4f1;
	color: #007185;
}

/* ==========================================================================
   BOTTOM SHEET: Cover Image Picker (Amazon-style)
   ========================================================================== */

.tsgr-sheet {
	display: none;
	position: fixed;
	z-index: 9999;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.tsgr-sheet__overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.tsgr-sheet--open .tsgr-sheet__overlay {
	opacity: 1;
}

.tsgr-sheet__content {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: #ffffff;
	border-radius: 16px 16px 0 0;
	max-height: 85vh;
	transform: translateY(100%);
	transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
	display: flex;
	flex-direction: column;
}

.tsgr-sheet--open .tsgr-sheet__content {
	transform: translateY(0);
}

.tsgr-sheet__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px 12px;
	border-bottom: 1px solid #e7e7e7;
	flex-shrink: 0;
}

.tsgr-sheet__header h3 {
	font-size: 18px;
	font-weight: 700;
	margin: 0;
	color: #0f1111;
}

.tsgr-sheet__close {
	font-size: 24px;
	line-height: 1;
	color: #565959;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
}

.tsgr-sheet__close:hover {
	background: #f3f3f3;
}

.tsgr-sheet__body {
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 16px 20px;
	flex: 1;
}

/* Full-width stacked templates */
.tsgr-sheet__templates {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.tsgr-sheet__template {
	width: 100%;
	aspect-ratio: 3 / 1;
	border-radius: 8px;
	overflow: hidden;
	cursor: pointer;
	border: 3px solid transparent;
	transition: border-color 0.15s ease, transform 0.15s ease;
	background: #f0f0f0;
	position: relative;
}

.tsgr-sheet__template:hover {
	transform: scale(1.01);
}

.tsgr-sheet__template--selected {
	border-color: #007185;
}

.tsgr-sheet__template img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Admin templates get teal indicator */
.tsgr-sheet__template--admin::after {
	content: '';
	position: absolute;
	top: 8px;
	right: 8px;
	width: 8px;
	height: 8px;
	background: #007185;
	border-radius: 50%;
}

.tsgr-sheet__footer {
	padding: 12px 20px 20px;
	border-top: 1px solid #e7e7e7;
	flex-shrink: 0;
}

.tsgr-btn-block {
	width: 100%;
	display: block;
}

/* Fallback for older browsers */
@supports not (aspect-ratio: 3 / 1) {
	.tsgr-sheet__template {
		height: 120px;
	}
}


/* --------------------------------------------------------------------------
   CURRENT COVER DISPLAY (Settings tab)
   -------------------------------------------------------------------------- */
.tsgr-current-cover {
	width: 100%;
	aspect-ratio: 3 / 1;
	overflow: hidden;
	border-radius: 6px;
	background: #f0f0f0;
	position: relative;
	margin-bottom: 12px;
}

.tsgr-current-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tsgr-remove-cover {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #565959;
	cursor: pointer;
	margin-top: 8px;
}

/* Fallback for older browsers */
@supports not (aspect-ratio: 3 / 1) {
	.tsgr-current-cover {
		height: 120px;
	}
}

/* ==========================================================================
   DESKTOP ENHANCEMENTS (append to existing media query)
   ========================================================================== */
@media (min-width: 768px) {

	.tsgr-modal__content {
		margin: 60px auto;
		max-height: calc(100vh - 120px);
	}

	.tsgr-preset-grid {
		grid-template-columns: repeat(4, 1fr);
	}

	.tsgr-preset-item {
		aspect-ratio: 3 / 1;
	}
	@supports not (aspect-ratio: 3 / 1) {
		.tsgr-preset-item {
			height: 100px;
		}
	}
	.tsgr-preset-item img {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

	.tsgr-cover-wrap {
		padding-bottom: 33.333%;
		min-height: 160px;
		max-height: 280px;
	}

	.tsgr-preset-grid {
		grid-template-columns: repeat(4, 1fr);
	}

	.tsgr-preset-item {
		aspect-ratio: 3 / 1;
	}
	@supports not (aspect-ratio: 3 / 1) {
		.tsgr-preset-item {
			height: 100px;
		}
	}
	.tsgr-preset-item img {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}
}

/* ==========================================================================
   SMALL MOBILE TWEAKS (append to existing media query)
   ========================================================================== */
@media (max-width: 380px) {
	.tsgr-cover-wrap {
		min-height: 100px;
		max-height: 160px;
	}
}

/* ==========================================================================
   PAGE CONTEXT: PUBLIC WISHLIST PAGE
   ========================================================================== */
.tsgr-public-page {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	color: #0f1111;
	background: #f3f3f3;
	max-width: 100%;
	margin: 0;
	padding: 0;
}

/* Public page header */
.tsgr-public-page .tsgr-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px;
	background: #ffffff;
	border-bottom: 1px solid #e7e7e7;
}


.tsgr-public-page .tsgr-header-info {
	flex: 1;
	min-width: 0;
}

.tsgr-public-page .tsgr-title {
	font-size: 20px;
	font-weight: 700;
	color: #0f1111;
	margin: 0 0 4px 0;
}

.tsgr-public-page .tsgr-by {
	font-size: 13px;
	color: #565959;
	margin: 0;
}

/* Public page list */
.tsgr-public-page .tsgr-list {
	padding: 8px;
}

/* Public page CTA */
.tsgr-public-page .tsgr-cta {
	padding: 20px 16px 40px;
	text-align: center;
	background: #ffffff;
	margin-top: 8px;
	border-top: 1px solid #e7e7e7;
}

.tsgr-public-page .tsgr-cta p {
	font-size: 15px;
	color: #0f1111;
	line-height: 1.5;
	margin: 0;
}

.tsgr-public-page .tsgr-cta-link {
	color: #007185;
	font-weight: 600;
}

.tsgr-public-page .tsgr-cta-link:hover {
	color: #c7511f;
	text-decoration: underline;
}

/* Public page password form */
.tsgr-public-page .tsgr-password-form {
	max-width: 360px;
	margin: 40px auto;
	padding: 24px;
	background: #ffffff;
	border-radius: 8px;
	border: 1px solid #e7e7e7;
}

.tsgr-public-page .tsgr-password-form h2 {
	font-size: 18px;
	font-weight: 600;
	margin: 0 0 16px 0;
}

.tsgr-public-page .tsgr-password-form input[type="password"] {
	width: 100%;
	padding: 12px;
	border: 1px solid #a6a6a6;
	border-radius: 4px;
	font-size: 15px;
	margin-bottom: 12px;
	font-family: inherit;
}

/* ==========================================================================
   PAGE CONTEXT: ACCOUNT / MY WISHLIST PAGE
   ========================================================================== */
.tsgr-account-page {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	color: #0f1111;
	background: #f3f3f3;
	max-width: 100%;
	margin: 0;
	padding: 0;
}

/* Account page header */
.tsgr-account-page .tsgr-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px;
	background: #ffffff;
	border-bottom: 1px solid #e7e7e7;
}

.tsgr-account-page .tsgr-header-info {
	flex: 1;
	min-width: 0;
}

.tsgr-account-page .tsgr-title {
	font-size: 20px;
	font-weight: 700;
	color: #0f1111;
	margin: 0 0 4px 0;
}

.tsgr-account-page .tsgr-by {
	font-size: 13px;
	color: #565959;
	margin: 0;
}

/* --------------------------------------------------------------------------
   TABS NAVIGATION
   -------------------------------------------------------------------------- */
.tsgr-tabs {
	display: flex;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	background: #ffffff;
	border-bottom: 1px solid #e7e7e7;
	padding: 0 8px;
	gap: 0;
	scrollbar-width: none;
}

.tsgr-tabs::-webkit-scrollbar {
	display: none;
}

.tsgr-tab {
	flex-shrink: 0;
	padding: 14px 16px;
	font-size: 14px;
	font-weight: 600;
	color: #565959;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	white-space: nowrap;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.tsgr-tab:hover {
	color: #0f1111;
}

.tsgr-tab--active {
	color: #007185;
	border-bottom-color: #007185;
}

/* --------------------------------------------------------------------------
   TAB CONTENT
   -------------------------------------------------------------------------- */
.tsgr-tab-content {
	padding: 8px;
}

/* --------------------------------------------------------------------------
   WISHLIST BAR: Selector + Create New Button
   -------------------------------------------------------------------------- */
.tsgr-wishlist-bar {
	background: #ffffff;
	padding: 12px 16px;
	border-bottom: 1px solid #e7e7e7;
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
}

.tsgr-wishlist-selector {
	flex: 1;
	min-width: 0;
}

.tsgr-wishlist-selector select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #a6a6a6;
	border-radius: 6px;
	font-size: 14px;
	font-family: inherit;
	background: #ffffff;
	color: #0f1111;
}

.tsgr-btn-create {
	flex-shrink: 0;
	white-space: nowrap;
}

/* Section header bar */
.tsgr-section-header-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}

.tsgr-section-header-bar .tsgr-section-header {
	margin: 0;
	padding: 0;
	border: none;
}

/* --------------------------------------------------------------------------
   ADD SECTIONS (Add Items tab)
   -------------------------------------------------------------------------- */
.tsgr-add-section {
	background: #ffffff;
	border-radius: 8px;
	border: 1px solid #e7e7e7;
	padding: 16px;
	margin-bottom: 12px;
}

.tsgr-add-section:last-child {
	margin-bottom: 0;
}

.tsgr-add-section__title {
	font-size: 16px;
	font-weight: 700;
	color: #0f1111;
	margin: 0 0 16px 0;
}

.tsgr-add-form {
	max-width: 100%;
}

/* Compact create wishlist panel */
.tsgr-add-panel--compact {
	background: #ffffff;
	border-radius: 8px;
	border: 1px solid #e7e7e7;
	padding: 16px;
	margin: 8px;
}

.tsgr-add-panel--compact h3 {
	font-size: 16px;
	font-weight: 700;
	margin: 0 0 12px 0;
	color: #0f1111;
}

/* --------------------------------------------------------------------------
   SETTINGS SECTIONS
   -------------------------------------------------------------------------- */
.tsgr-settings-section {
	background: #ffffff;
	border-radius: 8px;
	border: 1px solid #e7e7e7;
	padding: 16px;
	margin-bottom: 12px;
}

.tsgr-settings-section:last-child {
	margin-bottom: 0;
}

.tsgr-settings-section__title {
	font-size: 16px;
	font-weight: 700;
	color: #0f1111;
	margin: 0 0 16px 0;
}

.tsgr-settings-section--danger {
	border-color: #f5c6cb;
	background: #fff5f5;
}

.tsgr-settings-form {
	max-width: 100%;
}

/* --------------------------------------------------------------------------
   FORMS
   -------------------------------------------------------------------------- */
.tsgr-form-row {
	display: flex;
	gap: 10px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}

.tsgr-form-row:last-child {
	margin-bottom: 0;
}

.tsgr-form-row--inline {
	flex-wrap: nowrap;
}

.tsgr-form-row--inline input,
.tsgr-form-row--inline select {
	flex: 1;
}

.tsgr-form-row--inline .tsgr-btn {
	flex-shrink: 0;
}

.tsgr-form-row--2col > * {
	flex: 1 1 calc(50% - 5px);
	min-width: 140px;
}

.tsgr-form-row--3col > * {
	flex: 1 1 calc(33.333% - 7px);
	min-width: 100px;
}

.tsgr-form-row input,
.tsgr-form-row select,
.tsgr-form-row textarea {
	flex: 1;
	min-width: 140px;
	padding: 10px 12px;
	border: 1px solid #a6a6a6;
	border-radius: 4px;
	font-size: 14px;
	font-family: inherit;
	background: #ffffff;
	color: #0f1111;
}

.tsgr-form-row input:focus,
.tsgr-form-row select:focus {
	outline: none;
	border-color: #007185;
	box-shadow: 0 0 0 2px rgba(0, 113, 133, 0.15);
}

.tsgr-form-select {
	width: 100%;
}

.tsgr-form-label {
	font-size: 14px;
	font-weight: 600;
	color: #565959;
	min-width: 80px;
	padding-top: 10px;
}

/* --------------------------------------------------------------------------
   DETAILS / COLLAPSIBLE (for optional fields)
   -------------------------------------------------------------------------- */
.tsgr-details {
	width: 100%;
	margin-bottom: 12px;
	border: 1px solid #e7e7e7;
	border-radius: 6px;
	background: #fafafa;
}

.tsgr-details summary {
	padding: 10px 12px;
	font-size: 13px;
	color: #007185;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: center;
	gap: 6px;
}

.tsgr-details summary::-webkit-details-marker {
	display: none;
}

.tsgr-details summary::before {
	content: '+';
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
}

.tsgr-details[open] summary::before {
	content: '−';
}

.tsgr-details__body {
	padding: 0 12px 12px;
	border-top: 1px solid #e7e7e7;
	background: #ffffff;
}

/* --------------------------------------------------------------------------
   SHARE BUTTONS
   -------------------------------------------------------------------------- */
.tsgr-share-buttons {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.tsgr-share-btn {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	cursor: pointer;
	border: 1px solid #d5d9d9;
	background: #ffffff;
	color: #0f1111;
	transition: background-color 0.15s ease;
}

.tsgr-share-btn:hover {
	background: #f7fafa;
}

.tsgr-share-btn.tsgr-whatsapp { background: #25d366; color: #fff; border-color: #25d366; }
.tsgr-share-btn.tsgr-facebook { background: #1877f2; color: #fff; border-color: #1877f2; }
.tsgr-share-btn.tsgr-x { background: #000000; color: #fff; border-color: #000000; }

/* --------------------------------------------------------------------------
   WISHLISTS SECTION (bottom grid)
   -------------------------------------------------------------------------- */
.tsgr-wishlists-section {
	padding: 8px;
	margin-top: 8px;
}

.tsgr-wishlist-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
}

.tsgr-wishlist-card {
	background: #ffffff;
	border-radius: 8px;
	border: 1px solid #e7e7e7;
	padding: 16px;
}

.tsgr-wishlist-card h4 {
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 8px 0;
}

.tsgr-wishlist-card h4 a {
	color: #0f1111;
}

.tsgr-wishlist-card h4 a:hover {
	color: #007185;
}

.tsgr-wishlist-card-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.tsgr-wishlist-card-meta small {
	color: #565959;
	font-size: 12px;
}

/* ==========================================================================
   DESKTOP ENHANCEMENTS
   ========================================================================== */
@media (min-width: 768px) {
	.tsgr-public-page,
	.tsgr-account-page {
		max-width: 800px;
		margin: 0 auto;
		padding: 16px 0;
	}

	.tsgr-public-page .tsgr-header,
	.tsgr-account-page .tsgr-header {
		border-radius: 8px;
		margin-bottom: 8px;
	}

	.tsgr-public-page .tsgr-list,
	.tsgr-account-page .tsgr-list {
		padding: 0;
	}

	.tsgr-card {
		border-radius: 8px;
		padding: 16px;
		gap: 16px;
	}

	.tsgr-item-image {
		width: 110px;
		height: 110px;
	}

	.tsgr-item-name {
		font-size: 16px;
	}

	.tsgr-btn {
		padding: 12px 20px;
		font-size: 15px;
	}

	.tsgr-tab-content {
		padding: 16px 0;
	}

	.tsgr-tabs {
		border-radius: 8px 8px 0 0;
		padding: 0 16px;
	}

	.tsgr-wishlist-selector {
		border-radius: 0 0 8px 8px;
		margin-bottom: 8px;
	}

	.tsgr-add-section,
	.tsgr-settings-section {
		padding: 20px;
	}

	.tsgr-wishlist-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
		padding: 0;
	}

	.tsgr-wishlists-section {
		padding: 0;
		margin-top: 16px;
	}

	.tsgr-add-panel--compact {
		margin: 0 0 16px 0;
	}
}

/* ==========================================================================
   SMALL MOBILE TWEAKS
   ========================================================================== */
@media (max-width: 380px) {
	.tsgr-item-image {
		width: 72px;
		height: 72px;
	}

	.tsgr-item-name {
		font-size: 14px;
	}

	.tsgr-btn {
		padding: 8px 12px;
		font-size: 13px;
	}

	.tsgr-tab {
		padding: 12px 12px;
		font-size: 13px;
	}

	.tsgr-form-row--inline {
		flex-wrap: wrap;
	}

	.tsgr-form-row--inline .tsgr-btn {
		width: 100%;
	}

	.tsgr-wishlist-bar {
		flex-direction: column;
		align-items: stretch;
	}

	.tsgr-btn-create {
		width: 100%;
		text-align: center;
		padding: 12px 16px;
		font-size: 15px;
	}

	.tsgr-section-header-bar {
		flex-direction: column;
		align-items: flex-start;
	}
}