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

/*
 * TABLE OF CONTENTS
 *
 * 1.0 - Main Action Buttons
 * 2.0 - Modal Container & Base
 * 3.0 - Custom Form Component Styling
 * 4.0 - Footer and Result Display
 * 5.0 - Responsive Styles
 */

/* ==========================================================================
   1.0 - Main Action Buttons
   ========================================================================== */
.aitnb-start-tryon-btn,
.aitnb-open-fit-recommender {
	flex-basis: 100%;
	width: 100%;
	margin-left: 0;
	margin-right: 0;
    border: none;
    border-radius: 5px;
    color: #fff;
    background-color: red;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    padding: 10px;
    font-family: inherit;
    font-size: inherit;
}

/* ==========================================================================
   2.0 - Modal Container & Base
   ========================================================================== */
.aitnb-fit-modal-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

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

.aitnb-fit-modal-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-fit-modal-content {
	position: relative;
	background-color: #ffffff;
	z-index: 2;
	width: 100%;
	max-width: 480px;
	border-radius: 8px;
	box-shadow: 0 10px 35px rgba(0,0,0,0.25);
	display: flex;
	flex-direction: column;
	max-height: 90vh;
	transform: scale(0.95);
	transition: transform 0.3s ease;
}

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

.aitnb-fit-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 24px;
	border-bottom: 1px solid #e5e7eb;
	flex-shrink: 0;
}

.aitnb-fit-modal-header h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: #111827;
}

.aitnb-fit-modal-close-btn {
	background: #f3f4f6;
	border: none;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	color: #6b7280;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.aitnb-fit-modal-close-btn:hover {
	background-color: #e5e7eb;
	color: #111827;
}

.aitnb-fit-modal-body {
	padding: 24px;
	overflow-y: auto;
}

.aitnb-fit-modal-body p {
	margin-top: 0;
	margin-bottom: 24px;
	color: #4b5563;
	font-size: 15px;
	line-height: 1.5;
}

/* ==========================================================================
   3.0 - Custom Form Component Styling
   ========================================================================== */
.aitnb-fit-modal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.aitnb-component-label {
	display: block;
	font-weight: 500;
	margin-bottom: 8px;
	font-size: 14px;
	color: #374151;
}

.aitnb-input-wrapper,
.aitnb-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.aitnb-input-wrapper:focus-within,
.aitnb-select-wrapper:focus-within {
	border-color: #4338ca;
	box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.2);
}

.aitnb-component-input,
.aitnb-component-select {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    font-size: 16px;
    color: #111827;
    border: none;
    background: transparent;
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

.aitnb-select-wrapper::after {
    content: '';
    position: absolute;
    right: 14px;
    width: 1.1em;
    height: 1.1em;
    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: center;
    pointer-events: none;
}

.aitnb-fit-modal-button {
	width: 100%;
	height: 48px;
	padding: 0 12px;
	margin-top: 10px;
	border: none;
	border-radius: 6px;
	font-weight: 600;
	font-size: 16px;
	color: #fff;
	background-color: #4f46e5;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.1s ease;
}

.aitnb-fit-modal-button:hover {
	background-color: #4338ca;
}

.aitnb-fit-modal-button:active {
    transform: scale(0.98);
}

/* ==========================================================================
   4.0 - Footer and Result Display
   ========================================================================== */
.aitnb-fit-modal-footer {
	padding: 20px 24px;
	border-top: 1px solid #e5e7eb;
	flex-shrink: 0;
	background-color: #f9fafb;
	border-bottom-left-radius: 8px;
	border-bottom-right-radius: 8px;
}

.aitnb-fit-modal-result {
	min-height: 54px;
	padding: 16px;
	border-radius: 6px;
	background-color: #ffffff;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	transition: all 0.2s ease;
}

.aitnb-fit-modal-result.loading {
	color: #4b5563;
	background-color: #f3f4f6;
}

.aitnb-fit-modal-result.success {
	background-color: #ecfdf5;
	color: #065f46;
	font-weight: 600;
}

.aitnb-fit-modal-result.error {
	background-color: #fef2f2;
	color: #991b1b;
}

/* ==========================================================================
   5.0 - Responsive Styles
   ========================================================================== */
@media (min-width: 768px) {
	.aitnb-start-tryon-btn,
	.aitnb-open-fit-recommender {
		flex-basis: calc(50% - 10px);
		width: calc(50% - 10px);
	}
}