/* Gift List Manager — Public CSS
 * Stili base per shortcode + /giftlist/{slug}. Ereditano tipografia dal tema.
 */

.giftlist-public { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.giftlist-container { max-width: 720px; margin: 0 auto; }

.giftlist-cover {
	height: 280px; background-size: cover; background-position: center;
	border-radius: 10px; margin-bottom: 30px;
}

.giftlist-header { text-align: center; margin-bottom: 30px; }
.giftlist-header h1 { font-size: 32px; margin-bottom: 10px; }
.giftlist-date { color: #6b7280; font-size: 16px; font-weight: 500; }
.giftlist-description { margin-top: 16px; color: #4b5563; line-height: 1.6; }

/* Flash */
.giftlist-flash {
	padding: 14px 18px; border-radius: 8px; margin-bottom: 20px;
	border-left: 4px solid; font-size: 14px;
}
.giftlist-flash-success { background: #ecfdf5; border-color: #10b981; color: #065f46; }
.giftlist-flash-error   { background: #fef2f2; border-color: #ef4444; color: #991b1b; }
.giftlist-flash-info    { background: #eff6ff; border-color: #3b82f6; color: #1e40af; }

/* Favorites toolbar */
.giftlist-fav-toolbar {
	position: sticky; top: 10px; z-index: 50;
	background: #fff; border: 1px solid #e5e7eb; border-radius: 30px;
	padding: 10px 20px; margin-bottom: 20px;
	display: flex; justify-content: space-between; align-items: center;
	box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.giftlist-fav-toolbar button {
	background: transparent; border: none; cursor: pointer;
	color: #3b82f6; font-weight: 600; font-size: 14px;
}
.giftlist-filtered-out { display: none !important; }

/* Gift card (contributo libero) */
.giftlist-giftcard {
	background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
	border: 2px solid #f59e0b; border-radius: 14px;
	padding: 24px; margin-bottom: 30px;
}
.giftlist-giftcard h3 { margin: 0 0 8px; color: #78350f; font-size: 22px; }
.giftlist-giftcard p { color: #92400e; margin-bottom: 14px; }

/* Items */
.giftlist-items { display: flex; flex-direction: column; gap: 20px; }
.giftlist-item {
	background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
	overflow: hidden; display: flex; flex-direction: column;
	transition: box-shadow .2s, transform .2s;
}
.giftlist-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.giftlist-item.giftlist-focus { outline: 3px solid #3b82f6; outline-offset: 4px; }

.giftlist-item-image { width: 100%; height: 220px; object-fit: cover; }
.giftlist-item-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.giftlist-item-body h3 { margin: 0; font-size: 20px; }
.giftlist-item-body p { margin: 0; color: #4b5563; line-height: 1.5; }

.giftlist-item-status {
	display: inline-block; padding: 6px 14px; border-radius: 20px;
	font-weight: 600; font-size: 14px;
	background: #f3f4f6; color: #374151; width: fit-content;
}
.giftlist-status-fulfilled .giftlist-item-status { background: #d1fae5; color: #065f46; }
.giftlist-status-reserved  .giftlist-item-status { background: #dbeafe; color: #1e3a8a; }

/* Progress */
.giftlist-progress { background: #e5e7eb; height: 8px; border-radius: 4px; overflow: hidden; }
.giftlist-progress-bar { height: 100%; background: linear-gradient(90deg, #10b981, #059669); transition: width .3s; }
.giftlist-progress-text { font-size: 13px; color: #6b7280; font-weight: 600; }

/* Social proof */
.giftlist-social-proof { display: flex; flex-wrap: wrap; gap: 8px; }
.giftlist-pill {
	background: #f3f4f6; color: #6b7280;
	padding: 4px 10px; border-radius: 12px; font-size: 12px;
}
.giftlist-pill.giftlist-hot { background: #fee2e2; color: #991b1b; }
.giftlist-pill.giftlist-recent { background: #dbeafe; color: #1e40af; }

/* Item toolbar */
.giftlist-item-toolbar {
	display: flex; justify-content: space-between; align-items: center;
	gap: 8px; margin-top: 10px; padding-top: 10px;
	border-top: 1px solid #f3f4f6;
}
.giftlist-fav-btn {
	background: transparent; border: 1px solid #e5e7eb; border-radius: 50%;
	width: 36px; height: 36px; cursor: pointer; font-size: 18px;
	transition: transform .15s;
}
.giftlist-fav-btn.active { background: #fecaca; border-color: #ef4444; color: #dc2626; }
.giftlist-fav-btn:hover { transform: scale(1.1); }
.giftlist-share-btn {
	background: transparent; border: 1px solid #e5e7eb; border-radius: 18px;
	padding: 6px 14px; font-size: 13px; cursor: pointer;
}
.giftlist-share-btn:hover { background: #f3f4f6; }

/* Buttons */
.giftlist-btn {
	display: inline-block; padding: 10px 20px;
	border: 1px solid #d1d5db; border-radius: 8px;
	background: #fff; color: #111827; font-weight: 500;
	text-decoration: none; cursor: pointer; font-size: 14px;
	transition: background .15s, transform .1s;
}
.giftlist-btn:hover { background: #f9fafb; }
.giftlist-btn-primary {
	background: #3b82f6; color: #fff; border-color: #3b82f6;
}
.giftlist-btn-primary:hover { background: #2563eb; transform: translateY(-1px); }

/* Forms */
.giftlist-form { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.giftlist-field { display: flex; flex-direction: column; gap: 6px; }
.giftlist-field label { font-weight: 500; font-size: 14px; color: #374151; }
.giftlist-field input[type="text"],
.giftlist-field input[type="email"],
.giftlist-field input[type="number"],
.giftlist-field input[type="date"],
.giftlist-field select,
.giftlist-field textarea {
	padding: 10px 14px; border: 1px solid #d1d5db; border-radius: 8px;
	font-size: 14px; font-family: inherit; background: #fff;
}
.giftlist-field input:focus,
.giftlist-field textarea:focus,
.giftlist-field select:focus {
	outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}
.giftlist-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Login card */
.giftlist-login-card {
	max-width: 440px; margin: 40px auto; padding: 32px;
	background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0,0,0,.05);
}
.giftlist-login-card h2 { margin-top: 0; font-size: 24px; }
.giftlist-login-card p { color: #6b7280; margin-bottom: 20px; }

/* Dashboard */
.giftlist-dashboard-header {
	display: flex; justify-content: space-between; align-items: center;
	margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid #e5e7eb;
}
.giftlist-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.giftlist-card {
	background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
	padding: 20px; display: flex; flex-direction: column; gap: 10px;
}
.giftlist-card h3 { margin: 0; }
.giftlist-card-date { color: #6b7280; font-size: 14px; margin: 0; }
.giftlist-card-stats { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; color: #6b7280; }
.giftlist-card-stats span { background: #f3f4f6; padding: 4px 10px; border-radius: 10px; }
.giftlist-card-actions { display: flex; gap: 8px; margin-top: auto; }

.giftlist-create-section {
	margin-top: 40px; padding: 28px; background: #f9fafb;
	border: 1px solid #e5e7eb; border-radius: 12px;
}
.giftlist-create-section h3 { margin-top: 0; }

.giftlist-empty {
	text-align: center; padding: 40px;
	color: #6b7280; background: #f9fafb;
	border-radius: 12px;
}

@media (max-width: 720px) {
	.giftlist-row { grid-template-columns: 1fr; }
	.giftlist-cover { height: 180px; }
	.giftlist-header h1 { font-size: 24px; }
}

/* =======================================================
   Manage list (owner view)
   ======================================================= */
.giftlist-manage { padding: 24px 0; }
.giftlist-manage-header {
	display: flex; flex-wrap: wrap; gap: 16px;
	justify-content: space-between; align-items: flex-start;
	padding-bottom: 20px; border-bottom: 1px solid #e5e7eb; margin-bottom: 24px;
}
.giftlist-manage-header h1 { margin: 0 0 8px; font-size: 28px; }
.giftlist-manage-meta { color: #6b7280; font-size: 13px; margin: 4px 0; }
.giftlist-manage-meta a { color: #2563eb; margin-right: 8px; word-break: break-all; }
.giftlist-manage-badges { margin: 8px 0 0; display: flex; gap: 6px; flex-wrap: wrap; }
.giftlist-badge {
	display: inline-block; padding: 3px 10px; border-radius: 999px;
	font-size: 11px; font-weight: 600; text-transform: uppercase;
}
.giftlist-badge-ok { background: #d1fae5; color: #065f46; }
.giftlist-badge-muted { background: #e5e7eb; color: #4b5563; }
.giftlist-badge-info { background: #dbeafe; color: #1e40af; }
.giftlist-badge-err { background: #fee2e2; color: #991b1b; }

.giftlist-manage-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.giftlist-inline-form { display: inline; margin: 0; }
.giftlist-btn-warn { background: #f59e0b; color: #fff; }
.giftlist-btn-danger { background: #dc2626; color: #fff; }
.giftlist-copy-link { cursor: pointer; }

.giftlist-manage-section {
	background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
	padding: 24px; margin-bottom: 24px;
}
.giftlist-manage-section h2 { margin: 0 0 16px; font-size: 18px; }
.giftlist-manage-section h3 { margin: 20px 0 12px; font-size: 15px; color: #4b5563; }

.giftlist-manage-table {
	width: 100%; border-collapse: collapse; font-size: 14px;
}
.giftlist-manage-table th, .giftlist-manage-table td {
	text-align: left; padding: 10px 8px; border-bottom: 1px solid #f3f4f6;
	vertical-align: top;
}
.giftlist-manage-table th { font-weight: 600; color: #6b7280; font-size: 12px; text-transform: uppercase; }
.giftlist-status {
	display: inline-block; padding: 2px 8px; border-radius: 4px;
	font-size: 11px; font-weight: 600;
}
.giftlist-status-available { background: #d1fae5; color: #065f46; }
.giftlist-status-partial { background: #fef3c7; color: #92400e; }
.giftlist-status-reserved { background: #dbeafe; color: #1e40af; }
.giftlist-status-fulfilled { background: #e5e7eb; color: #374151; }

.giftlist-row-actions { display: flex; gap: 8px; align-items: center; }
.giftlist-btn-link {
	background: none; border: none; cursor: pointer;
	color: #2563eb; padding: 4px 0; font-size: 13px;
}
.giftlist-btn-link-danger { color: #dc2626; }

.giftlist-edit-row > td { background: #f9fafb; }
.giftlist-form-inline { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.giftlist-form-inline .giftlist-field { margin: 0; }
.giftlist-hint { color: #6b7280; font-size: 13px; font-style: italic; }

.giftlist-badge-gold { background: linear-gradient(135deg,#fde68a,#f59e0b); color: #78350f; }

/* Speed list panel (manage view) */
.giftlist-speed-panel {
	background: linear-gradient(135deg, #fef3c7 0%, #fff 60%);
	border-color: #fcd34d;
}
.giftlist-speed-stats { margin-bottom: 20px; }
.giftlist-speed-big {
	display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px;
}
.giftlist-speed-amount {
	font-size: 42px; font-weight: 700; color: #78350f;
}
.giftlist-speed-target { font-size: 16px; color: #92400e; }
.giftlist-speed-bar {
	height: 12px; background: #fef3c7; border-radius: 999px; overflow: hidden;
	border: 1px solid #fcd34d;
}
.giftlist-speed-bar-fill {
	height: 100%;
	background: linear-gradient(90deg, #f59e0b, #d97706);
	transition: width .4s ease;
}

/* Speed list hero (public view) */
.giftlist-speed-hero {
	background: linear-gradient(135deg,#fef3c7,#fde68a);
	border: 1px solid #fcd34d;
	border-radius: 16px;
	padding: 32px;
	text-align: center;
	margin-bottom: 24px;
}
.giftlist-speed-hero h2 { margin: 0 0 8px; font-size: 24px; color: #78350f; }
.giftlist-speed-subtitle { color: #92400e; margin: 0 0 20px; }
.giftlist-speed-big-amount {
	font-size: 48px; font-weight: 800; color: #78350f; line-height: 1; margin: 16px 0;
}
.giftlist-speed-big-amount small {
	display: block; font-size: 16px; font-weight: 400; color: #a16207; margin-top: 8px;
}

/* Type choice cards */
.giftlist-type-choice {
	display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px;
}
.giftlist-type-card {
	display: flex; flex-direction: column; align-items: center; text-align: center;
	padding: 24px 20px;
	border: 2px solid #e5e7eb; border-radius: 12px;
	cursor: pointer;
	transition: all .2s;
	background: #fff;
}
.giftlist-type-card:hover { border-color: #2563eb; }
.giftlist-type-card input[type=radio] { position: absolute; opacity: 0; }
.giftlist-type-card:has(input:checked) {
	border-color: #2563eb;
	background: #eff6ff;
	box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.giftlist-type-card-speed:has(input:checked) {
	border-color: #f59e0b;
	background: #fffbeb;
	box-shadow: 0 0 0 3px rgba(245,158,11,.2);
}
.gl-type-icon { font-size: 36px; margin-bottom: 8px; }
.giftlist-type-card strong { font-size: 16px; margin-bottom: 4px; }
.giftlist-type-card small { color: #6b7280; font-size: 12px; line-height: 1.4; }

/* Woo picker */
.giftlist-picker { display: flex; flex-direction: column; gap: 16px; }
.giftlist-picker-search {
	width: 100%; padding: 12px 16px; font-size: 15px;
	border: 2px solid #e5e7eb; border-radius: 8px;
}
.giftlist-picker-results {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 10px; min-height: 40px;
}
.gl-picker-item {
	display: flex; align-items: center; gap: 10px;
	padding: 10px; border: 1px solid #e5e7eb; border-radius: 8px;
	cursor: pointer; background: #fff;
	transition: all .15s;
}
.gl-picker-item:hover { border-color: #2563eb; background: #f9fafb; }
.gl-picker-item.gl-picked { border-color: #059669; background: #d1fae5; }
.gl-picker-item img, .gl-picker-item .gl-thumb-ph {
	width: 48px; height: 48px; object-fit: cover; border-radius: 6px; flex-shrink: 0;
	background: #f3f4f6;
}
.gl-pi-info { flex: 1; min-width: 0; }
.gl-pi-info strong { display: block; font-size: 13px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-pi-info span { color: #6b7280; font-size: 12px; }
.gl-picker-item button {
	width: 32px; height: 32px; border-radius: 6px; border: none;
	background: #2563eb; color: #fff; font-size: 16px; cursor: pointer;
	flex-shrink: 0;
}
.gl-picker-item.gl-picked button { background: #059669; }

.giftlist-picker-selected {
	border-top: 1px dashed #e5e7eb; padding-top: 16px;
}
.giftlist-picker-selected h4 { margin: 0 0 12px; font-size: 14px; color: #4b5563; }
.gl-picker-list { list-style: none; padding: 0; margin: 0; }
.gl-picker-list li {
	display: flex; align-items: center; gap: 8px; padding: 8px 0;
	border-bottom: 1px solid #f3f4f6;
}
.gl-picker-list li span { flex: 1; font-size: 13px; }
.gl-picker-list li em { color: #6b7280; font-style: normal; font-size: 12px; }
.gl-picker-list li button[data-remove] {
	border: none; background: #fee2e2; color: #991b1b;
	width: 24px; height: 24px; border-radius: 4px; cursor: pointer; font-size: 14px;
}

.giftlist-giftcard-speed { background: transparent; border: none; padding: 0; }

/* Variable product picker */
.gl-picker-variable { border-color: #c9a84c; background: #fffbeb; }
.gl-expand-btn { background: #f59e0b !important; font-size: 12px !important; }
.gl-picker-variants { padding: 4px 0 8px; }
.gl-picker-variant {
	margin-left: 16px;
	border-left: 3px solid #c9a84c;
}
.gl-picker-variant img { width: 36px; height: 36px; }

.giftlist-visibility-box {
	border: 1px dashed #fcd34d;
	background: #fffbeb;
	border-radius: 8px;
	padding: 14px 18px;
	margin: 16px 0;
}
.giftlist-visibility-box legend {
	padding: 0 8px; font-size: 12px; font-weight: 600;
	color: #78350f; text-transform: uppercase; letter-spacing: .5px;
}
.giftlist-visibility-box label {
	display: block; margin: 6px 0; font-size: 14px; color: #4b5563;
}

@media (max-width: 720px) {
	.giftlist-manage-header { flex-direction: column; }
	.giftlist-manage-table { font-size: 12px; }
	.giftlist-manage-table th { display: none; }
	.giftlist-manage-table td { display: block; border: none; padding: 4px 0; }
	.giftlist-manage-table tr { border-bottom: 1px solid #e5e7eb; padding: 12px 0; display: block; }
}


