/* =============================================================================
   Advanced Wishlist for WooCommerce – Frontend Styles
   ============================================================================= */

/* --------------------------------------------------------------------------
   Add-to-Wishlist Button
   -------------------------------------------------------------------------- */
.aww-add-button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: transparent;
	border: 1px solid currentColor;
	border-radius: 3px;
	padding: 8px 14px;
	cursor: pointer;
	font-size: 0.875em;
	color: #555;
	transition: color 0.2s, border-color 0.2s, background 0.2s;
	margin-top: 8px;
	white-space: nowrap;
	text-decoration: none;
	vertical-align: middle;
}

.aww-add-button:hover,
.aww-add-button:focus {
	color: #e2401c;
	border-color: #e2401c;
	outline: none;
}

.aww-add-button.aww-added {
	color: #e2401c;
	border-color: #e2401c;
}

.aww-add-button.aww-loading {
	opacity: 0.6;
	pointer-events: none;
}

.aww-add-button .aww-icon {
	flex-shrink: 0;
	transition: transform 0.2s;
}

.aww-add-button:hover .aww-icon,
.aww-add-button.aww-added .aww-icon {
	transform: scale(1.15);
}

/* --------------------------------------------------------------------------
   Mini Widget
   -------------------------------------------------------------------------- */
.aww-mini-widget {
	display: inline-flex;
	align-items: center;
}

.aww-mini-trigger {
	background: none;
	border: none;
	cursor: pointer;
	padding: 6px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: currentColor;
	transition: color 0.2s;
	position: relative;
}

.aww-mini-trigger:hover,
.aww-mini-trigger:focus {
	color: #e2401c;
	outline: none;
}

.aww-mini-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	background: #e2401c;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	border-radius: 9px;
	line-height: 1;
	position: absolute;
	top: 0;
	right: 0;
	transform: translate(30%, -30%);
}

.aww-mini-count:empty,
.aww-mini-count[data-count="0"] {
	display: none;
}

/* --------------------------------------------------------------------------
   Sliding Panel Overlay
   -------------------------------------------------------------------------- */
.aww-panel-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	z-index: 999998;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.aww-panel-overlay.aww-open {
	opacity: 1;
	visibility: visible;
}

/* --------------------------------------------------------------------------
   Sliding Panel
   -------------------------------------------------------------------------- */
.aww-panel {
	position: fixed;
	top: 0;
	right: 0;
	width: 400px;
	max-width: 100vw;
	height: 100%;
	background: #fff;
	z-index: 999999;
	transform: translateX(100%);
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
	display: flex;
	flex-direction: column;
	box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
}

.aww-panel-overlay.aww-open .aww-panel {
	transform: translateX(0);
}

.aww-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px;
	border-bottom: 1px solid #eee;
	flex-shrink: 0;
}

.aww-panel-title {
	margin: 0;
	font-size: 1.1em;
	font-weight: 700;
	color: #333;
}

.aww-panel-close {
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	color: #666;
	line-height: 1;
	border-radius: 3px;
	transition: color 0.2s, background 0.2s;
}

.aww-panel-close:hover {
	color: #e2401c;
	background: #fef0ed;
}

.aww-panel-content {
	flex: 1;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

/* --------------------------------------------------------------------------
   Panel Loading
   -------------------------------------------------------------------------- */
.aww-panel-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 120px;
}

.aww-spinner {
	display: inline-block;
	width: 28px;
	height: 28px;
	border: 3px solid #eee;
	border-top-color: #e2401c;
	border-radius: 50%;
	animation: aww-spin 0.7s linear infinite;
}

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

/* --------------------------------------------------------------------------
   Panel Tabs (multiple wishlists)
   -------------------------------------------------------------------------- */
.aww-panel-tabs {
	display: flex;
	align-items: center;
	border-bottom: 1px solid #eee;
	padding: 0 16px;
	gap: 4px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	flex-shrink: 0;
}

.aww-panel-tab {
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	padding: 10px 12px 8px;
	cursor: pointer;
	font-size: 0.85em;
	color: #666;
	white-space: nowrap;
	transition: color 0.2s, border-color 0.2s;
	margin-bottom: -1px;
}

.aww-panel-tab:hover,
.aww-panel-tab.aww-tab-active {
	color: #e2401c;
	border-bottom-color: #e2401c;
}

.aww-panel-new-list {
	background: none;
	border: none;
	cursor: pointer;
	color: #e2401c;
	padding: 8px 4px;
	flex-shrink: 0;
	margin-left: auto;
	display: flex;
	align-items: center;
}

/* --------------------------------------------------------------------------
   Panel List Actions
   -------------------------------------------------------------------------- */
.aww-panel-list-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	background: #fafafa;
	border-bottom: 1px solid #eee;
	flex-wrap: wrap;
}

.aww-privacy-select {
	font-size: 0.8em;
	padding: 3px 6px;
	border: 1px solid #ddd;
	border-radius: 3px;
	background: #fff;
	cursor: pointer;
}

.aww-btn-rename {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 0.8em;
	color: #555;
	padding: 3px 6px;
	text-decoration: underline;
}

.aww-btn-rename:hover { color: #e2401c; }

.aww-btn-delete-list {
	background: none;
	border: none;
	cursor: pointer;
	color: #999;
	padding: 3px;
	margin-left: auto;
	display: flex;
	align-items: center;
	transition: color 0.2s;
}

.aww-btn-delete-list:hover { color: #cc0000; }

/* --------------------------------------------------------------------------
   Panel Items List
   -------------------------------------------------------------------------- */
.aww-panel-items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.aww-panel-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	border-bottom: 1px solid #f0f0f0;
	transition: background 0.15s;
}

.aww-panel-item:hover { background: #fafafa; }

.aww-item-image {
	flex-shrink: 0;
	width: 64px;
	height: 64px;
	overflow: hidden;
	border-radius: 4px;
	border: 1px solid #eee;
}

.aww-item-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.aww-item-details {
	flex: 1;
	min-width: 0;
}

.aww-item-name {
	font-weight: 600;
	font-size: 0.875em;
	color: #333;
	text-decoration: none;
	display: block;
	margin-bottom: 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.aww-item-name:hover { color: #e2401c; }

.aww-item-price {
	font-weight: 700;
	font-size: 0.9em;
	color: #e2401c;
	margin-bottom: 3px;
}

.aww-item-stock {
	font-size: 0.75em;
	color: #888;
}

.aww-item-stock.in-stock { color: #3a7d44; }
.aww-item-stock.out-of-stock { color: #cc0000; }

.aww-item-actions {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex-shrink: 0;
}

.aww-item-add-to-cart,
.aww-item-move,
.aww-item-remove {
	background: none;
	border: 1px solid #ddd;
	cursor: pointer;
	padding: 5px 7px;
	border-radius: 3px;
	color: #555;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s, border-color 0.2s, background 0.2s;
	line-height: 1;
}

.aww-item-add-to-cart:hover {
	color: #fff;
	background: #3a7d44;
	border-color: #3a7d44;
}

.aww-item-move:hover {
	color: #555;
	border-color: #999;
}

.aww-item-remove:hover {
	color: #fff;
	background: #cc0000;
	border-color: #cc0000;
}

/* --------------------------------------------------------------------------
   Panel Footer Actions
   -------------------------------------------------------------------------- */
.aww-panel-footer-actions {
	padding: 14px 16px;
	border-top: 1px solid #eee;
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
}

.aww-btn-add-all {
	flex: 1;
}

.aww-btn-view-full {
	font-size: 0.85em;
	color: #555;
	text-decoration: underline;
	white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Panel Empty State
   -------------------------------------------------------------------------- */
.aww-panel-empty {
	padding: 40px 20px;
	text-align: center;
	color: #999;
}

.aww-panel-empty-icon {
	margin-bottom: 16px;
	color: #ddd;
}

/* --------------------------------------------------------------------------
   Panel Sharing
   -------------------------------------------------------------------------- */
.aww-panel-sharing {
	padding: 14px 16px;
	border-top: 1px solid #eee;
	background: #fafafa;
}

.aww-panel-sharing h4 {
	margin: 0 0 8px;
	font-size: 0.85em;
	color: #666;
}

.aww-share-url-row {
	display: flex;
	gap: 6px;
	margin-bottom: 10px;
}

.aww-share-url {
	flex: 1;
	border: 1px solid #ddd;
	border-radius: 3px;
	padding: 6px 8px;
	font-size: 0.8em;
	color: #555;
	background: #fff;
}

.aww-copy-link {
	padding: 6px 12px;
	font-size: 0.8em;
	cursor: pointer;
	background: #555;
	color: #fff;
	border: none;
	border-radius: 3px;
	transition: background 0.2s;
	white-space: nowrap;
}

.aww-copy-link:hover { background: #333; }

/* --------------------------------------------------------------------------
   Social Share Buttons
   -------------------------------------------------------------------------- */
.aww-social-share {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 10px;
}

.aww-social-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	color: #fff;
	text-decoration: none;
	transition: opacity 0.2s, transform 0.2s;
	border: none;
	cursor: pointer;
}

.aww-social-btn:hover {
	opacity: 0.85;
	transform: translateY(-1px);
}

.aww-fb  { background: #1877f2; }
.aww-tw  { background: #000; }
.aww-pt  { background: #e60023; }
.aww-wa  { background: #25d366; }
.aww-tg  { background: #229ed9; }
.aww-email-share { background: #555; }

/* --------------------------------------------------------------------------
   Email Share Form
   -------------------------------------------------------------------------- */
.aww-email-form {
	padding: 10px 0 0;
}

.aww-email-to,
.aww-email-message {
	width: 100%;
	border: 1px solid #ddd;
	border-radius: 3px;
	padding: 7px 10px;
	font-size: 0.85em;
	margin-bottom: 6px;
	box-sizing: border-box;
	font-family: inherit;
}

.aww-email-message {
	resize: vertical;
	min-height: 70px;
}

/* --------------------------------------------------------------------------
   Wishlist Page (Full)
   -------------------------------------------------------------------------- */
.aww-wishlist-page {
	max-width: 100%;
}

.aww-page-header {
	margin-bottom: 24px;
}

.aww-page-tabs {
	display: flex;
	align-items: center;
	gap: 4px;
	border-bottom: 2px solid #eee;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.aww-page-tab {
	padding: 10px 18px 8px;
	text-decoration: none;
	color: #555;
	font-size: 0.9em;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: color 0.2s, border-color 0.2s;
}

.aww-page-tab:hover,
.aww-page-tab-active {
	color: #e2401c;
	border-bottom-color: #e2401c;
}

.aww-tab-count {
	background: #eee;
	border-radius: 9px;
	padding: 1px 7px;
	font-size: 0.8em;
}

.aww-page-new-list {
	background: none;
	border: 1px dashed #ddd;
	border-radius: 3px;
	cursor: pointer;
	padding: 6px 14px;
	font-size: 0.85em;
	color: #666;
	transition: border-color 0.2s, color 0.2s;
	margin-left: auto;
}

.aww-page-new-list:hover {
	border-color: #e2401c;
	color: #e2401c;
}

.aww-active-list-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.aww-list-name-display {
	font-weight: 700;
	font-size: 1.1em;
}

.aww-btn-link {
	background: none;
	border: none;
	cursor: pointer;
	text-decoration: underline;
	color: #555;
	font-size: 0.85em;
	padding: 0;
}

.aww-btn-link:hover { color: #e2401c; }
.aww-link-danger:hover { color: #cc0000; }

/* --------------------------------------------------------------------------
   Wishlist Table
   -------------------------------------------------------------------------- */
.aww-wishlist-table {
	width: 100%;
	border-collapse: collapse;
}

.aww-wishlist-table th {
	padding: 10px 12px;
	text-align: left;
	font-weight: 600;
	border-bottom: 2px solid #eee;
	font-size: 0.85em;
	color: #555;
}

.aww-wishlist-table td {
	padding: 14px 12px;
	border-bottom: 1px solid #f0f0f0;
	vertical-align: middle;
}

.aww-wishlist-table tr:hover td {
	background: #fafafa;
}

.aww-col-check  { width: 36px; text-align: center !important; padding-left: 8px !important; padding-right: 4px !important; }
.aww-col-remove { width: 30px; }
.aww-col-image  { width: 80px; }
.aww-col-price  { width: 100px; }
.aww-col-stock  { width: 100px; }
.aww-col-date   { width: 110px; white-space: nowrap; }

.aww-check-all,
.aww-item-check {
	width: 16px;
	height: 16px;
	cursor: pointer;
	accent-color: #4caf50;
	vertical-align: middle;
}

.aww-btn-add-selected {
	white-space: nowrap;
}

.aww-btn-add-selected:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.aww-col-image a {
	display: block;
}

.aww-col-image img {
	display: block;
	max-width: 70px;
	border-radius: 4px;
	border: 1px solid #eee;
}

.aww-col-name a {
	font-weight: 600;
	color: #333;
	text-decoration: none;
}

.aww-col-name a:hover { color: #e2401c; }

.aww-stock-status {
	font-size: 0.8em;
	font-weight: 600;
}

.aww-stock-status.in-stock  { color: #3a7d44; }
.aww-stock-status.out-of-stock { color: #cc0000; }

.aww-remove-icon {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 1.2em;
	color: #bbb;
	padding: 2px 6px;
	line-height: 1;
	transition: color 0.2s;
}

.aww-remove-icon:hover { color: #fff; background: #cc0000; border-radius: 3px; }

.aww-page-bulk-actions {
	margin-bottom: 16px;
}

/* Move/copy chooser */
.aww-move-copy-wrap {
	position: relative;
	display: inline-block;
	margin-top: 6px;
}

.aww-list-chooser {
	position: absolute;
	top: 100%;
	left: 0;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	box-shadow: 0 4px 12px rgba(0,0,0,.12);
	z-index: 100;
	min-width: 160px;
	padding: 4px 0;
}

.aww-list-choice {
	display: block;
	width: 100%;
	text-align: left;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px 14px;
	font-size: 0.85em;
	color: #333;
	transition: background 0.15s;
}

.aww-list-choice:hover { background: #f5f5f5; }

/* --------------------------------------------------------------------------
   Empty State (Page)
   -------------------------------------------------------------------------- */
.aww-empty-state {
	text-align: center;
	padding: 60px 20px;
	color: #888;
}

.aww-empty-icon {
	margin-bottom: 20px;
	color: #ddd;
}

.aww-empty-state h2 {
	font-size: 1.4em;
	margin-bottom: 10px;
	color: #555;
}

/* --------------------------------------------------------------------------
   Page Sharing Block
   -------------------------------------------------------------------------- */
.aww-page-sharing {
	background: #f9f9f9;
	border: 1px solid #eee;
	border-radius: 6px;
	padding: 20px;
	margin-bottom: 24px;
}

.aww-email-toggle {
	margin-top: 10px;
}

.aww-page-sharing .aww-social-share {
	margin-top: 12px;
}

.aww-page-sharing .aww-social-btn {
	width: auto;
	height: auto;
	border-radius: 4px;
	padding: 6px 12px;
	font-size: 0.8em;
	font-weight: 600;
}

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */
.aww-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.5);
	z-index: 99998;
}

.aww-modal {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: #fff;
	border-radius: 6px;
	padding: 28px;
	z-index: 99999;
	min-width: 320px;
	max-width: 90vw;
	box-shadow: 0 8px 32px rgba(0,0,0,.18);
}

.aww-modal h3 {
	margin: 0 0 18px;
	font-size: 1.1em;
}

.aww-modal input[type="text"] {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid #ddd;
	border-radius: 3px;
	font-size: 1em;
	margin-bottom: 16px;
	box-sizing: border-box;
}

.aww-modal-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
	.aww-panel {
		width: 100vw;
	}

	.aww-wishlist-table .aww-col-date,
	.aww-wishlist-table .aww-col-stock {
		display: none;
	}

	.aww-share-url-row {
		flex-direction: column;
	}

	.aww-wishlist-table {
		font-size: 0.9em;
	}
}

/* --------------------------------------------------------------------------
   Notification Toast
   -------------------------------------------------------------------------- */
.aww-toast {
	position: fixed;
	bottom: 24px;
	right: 24px;
	background: #333;
	color: #fff;
	padding: 12px 20px;
	border-radius: 4px;
	font-size: 0.875em;
	z-index: 999997;
	box-shadow: 0 4px 14px rgba(0,0,0,0.18);
	transform: translateY(0);
	opacity: 1;
	transition: opacity 0.3s, transform 0.3s;
	max-width: 380px;
	white-space: pre-line;
	line-height: 1.5;
}

.aww-toast.aww-toast-success { border-left: 4px solid #3a7d44; }
.aww-toast.aww-toast-error   { border-left: 4px solid #cc0000; }
.aww-toast.aww-toast-info    { border-left: 4px solid #e2401c; }
.aww-toast.aww-toast-hide    { opacity: 0; transform: translateY(8px); }
