/**
 * @package    Ai_Try_N_Buy
 * @subpackage Ai_Try_N_Buy/public/assets/css
 * @author     Edu Brazeal <contact@edubrazeal.com>
 *
 * All styles for the AI Style Assistant feature.
 */

/*
 * TABLE OF CONTENTS
 *
 * 1.0 - General Helper Styles
 * 2.0 - Main Section Styles
 * 2.1 - Header (Title & Button)
 * 2.2 - Variation Modal
 * 3.0 - List & Card Layout
 * 4.0 - Card Content
 * 5.0 - Notification Modal
 * 6.0 - Responsive Styles
 */

/* ==========================================================================
   1.0 - General Helper Styles
   ========================================================================== */

.aitnb-hidden {
	display: none;
}


/* ==========================================================================
   2.0 - Main Section Styles
   ========================================================================== */

.aitnb-style-assistant-section {
	clear: both;
	margin: 20px 0;
	padding: 10px;
	background-color: #f9fafb;
	border-radius: 12px;
	box-shadow: 0 4px 16px rgba(0,0,0,0.07);
	border: 1px solid #e5e7eb;
}

.aitnb-style-loader,
.aitnb-no-recommendations {
	text-align: center;
	padding: 20px;
	color: #777;
}

/* 2.1 - Header (Title & Button)
   -------------------------------------------------------------------------- */
.aitnb-style-assistant-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	gap: 15px;
}

.aitnb-style-assistant-header h2 {
	margin: 0;
	text-align: left;
	font-size: 22px;
	color: #111827;
	flex-shrink: 1;
}

.aitnb-action-buttons-container .button {
	margin-top: 0;
	margin-bottom: 0;
	margin-left: 0;
	margin-right: 0;
}

.aitnb-add-all-to-cart-btn {
	padding: 8px 16px;
	font-size: 0.9em;
	height: auto;
	line-height: 1.5;
	transition: background-color 0.3s ease, border-color 0.3s ease;
	white-space: nowrap;
	flex-shrink: 0;
}

.aitnb-add-all-to-cart-btn.is-added {
	background-color: #228b22;
	border-color: #1e7a1e;
	color: #fff;
}
.aitnb-add-all-to-cart-btn.is-added:hover {
	background-color: #1e7a1e;
	border-color: #196919;
	color: #fff;
}

/* 2.2 - Variation Modal
   -------------------------------------------------------------------------- */
.aitnb-variation-modal-body {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.aitnb-variation-product-item {
	padding: 20px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	position: relative;
}

.aitnb-variation-product-item:last-child {
	border-bottom: 1px solid #e5e7eb;
}

.aitnb-remove-variation-item {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 28px;
	height: 28px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #f3f4f6;
	color: #6b7280;
	border: none;
	border-radius: 50%;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	z-index: 10;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.aitnb-remove-variation-item:hover {
	background-color: #e5e7eb;
	color: #111827;
}

.aitnb-variation-product-info {
	display: flex;
	align-items: center;
	gap: 15px;
	margin-bottom: 15px;
}

.aitnb-variation-product-image {
	width: 60px;
	height: 60px;
	object-fit: cover;
	border-radius: 4px;
	flex-shrink: 0;
}

.aitnb-variation-product-title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
}

.aitnb-variation-selectors {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.aitnb-variation-selectors select {
	width: 100%;
    height: 42px;
    padding: 0 14px;
    font-size: 16px;
    color: #111827;
	border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: #fff;
	box-shadow: none;
    -webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23374151' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
	background-size: 1.1em;
}

.aitnb-variation-modal .aitnb-variation-selectors select.aitnb-selection-error {
	border-color: #d63638;
}

.aitnb-variation-product-price {
	margin-top: 15px;
	font-weight: bold;
	text-align: right;
}


/* ==========================================================================
   3.0 - List & Card Layout
   ========================================================================== */

.aitnb-recommendations-container {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.aitnb-product-card {
	border-radius: 8px;
	background-color: #ffffff;
	transition: box-shadow 0.3s ease;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.aitnb-product-card:hover {
	box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.aitnb-product-card a {
	display: flex;
	align-items: center;
	text-decoration: none;
	color: inherit;
	padding: 5px;
}


/* ==========================================================================
   4.0 - Card Content
   ========================================================================== */

.aitnb-product-card .aitnb-card-image {
	flex-shrink: 0;
}

.aitnb-product-card .aitnb-card-image img {
	width: 100px;
	height: 100px;
	display: block;
	object-fit: cover;
	border-radius: 4px;
}

.aitnb-product-card .aitnb-card-content {
	padding: 0 5px;
	text-align: left;
}

.aitnb-product-card .aitnb-card-title {
    display: -webkit-box;
    word-break: break-word;
    text-overflow: ellipsis;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.aitnb-product-card .aitnb-card-price {
    font-size: 12px;
	font-weight: bold;
	color: #555;
}

/* ==========================================================================
   5.0 - Notification Modal
   ========================================================================== */

.aitnb-notification-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.aitnb-notification-modal.is-visible {
	opacity: 1;
	visibility: visible;
}

.aitnb-notification-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(10, 22, 41, 0.7);
	backdrop-filter: blur(3px);
	z-index: 1;
}

.aitnb-notification-content {
	position: relative;
	background-color: #ffffff;
	z-index: 2;
	width: 100%;
	max-width: 400px;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0,0,0,0.3);
	padding: 32px 24px 24px;
	text-align: center;
	transform: scale(0.9);
	transition: transform 0.3s ease;
}

.aitnb-notification-modal.is-visible .aitnb-notification-content {
	transform: scale(1);
}

.aitnb-notification-icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background-color: #fef2f2;
}

.aitnb-notification-icon-inner {
	width: 40px;
	height: 40px;
	display: block;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3ccircle cx='12' cy='12' r='10'%3e%3c/circle%3e%3cline x1='12' y1='8' x2='12' y2='12'%3e%3c/line%3e%3cline x1='12' y1='16' x2='12.01' y2='16'%3e%3c/line%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

.aitnb-notification-modal.success .aitnb-notification-icon {
	background-color: #ecfdf5;
}

.aitnb-notification-modal.success .aitnb-notification-icon-inner {
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='20 6 9 17 4 12'%3e%3c/polyline%3e%3c/svg%3e");
}

.aitnb-notification-modal.warning .aitnb-notification-icon {
	background-color: #fef3c7;
}

.aitnb-notification-modal.warning .aitnb-notification-icon-inner {
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'%3e%3c/path%3e%3cline x1='12' y1='9' x2='12' y2='13'%3e%3c/line%3e%3cline x1='12' y1='17' x2='12.01' y2='17'%3e%3c/line%3e%3c/svg%3e");
}

.aitnb-notification-message {
	font-size: 16px;
	line-height: 1.5;
	color: #374151;
	margin-bottom: 24px;
	font-weight: 500;
}

.aitnb-notification-btn {
	width: 100%;
	height: 44px;
	padding: 0 24px;
	border: none;
	border-radius: 8px;
	font-weight: 600;
	font-size: 15px;
	color: #fff;
	background-color: #4f46e5;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.1s ease;
}

.aitnb-notification-btn:hover {
	background-color: #4338ca;
}

.aitnb-notification-btn:active {
	transform: scale(0.98);
}

/* ==========================================================================
   6.0 - Responsive Styles
   ========================================================================== */

@media (min-width: 768px) {
	.aitnb-recommendations-container {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}
}

@media (max-width: 480px) {
	.aitnb-style-assistant-header h2 {
		font-size: 18px;
	}

	.aitnb-add-all-to-cart-btn {
		padding: 6px 12px;
		font-size: 0.8em;
	}
	
	.aitnb-style-assistant-section {
		padding: 16px;
	}

	.aitnb-notification-content {
		padding: 28px 20px 20px;
	}

	.aitnb-notification-icon {
		width: 56px;
		height: 56px;
	}

	.aitnb-notification-icon-inner {
		width: 32px;
		height: 32px;
	}

	.aitnb-notification-message {
		font-size: 15px;
	}
}