/**
 * @package    Ai_Try_N_Buy
 * @subpackage Ai_Try_N_Buy/public/assets/css
 * @author     Edu Brazeal <contact@edubrazeal.com>
 *
 * All styles for the public-facing side of the plugin.
 */

/*
 * TABLE OF CONTENTS
 *
 * 1.0 - General Styles
 * 1.1 - Action Buttons Container
 *
 * 2.0 - AR Modal Styles
 * 2.1 - Main Container & Overlay
 * 2.2 - Modal Structure
 * 2.3 - Header, Body, Footer
 * 2.4 - Loader & Scene
 * 2.5 - Model Viewer Element
 * 2.6 - AR UI Controls
 */

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

/* 1.1 - Action Buttons Container
   -------------------------------------------------------------------------- */
.aitnb-action-buttons-container {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 1em 0;
	width: 100%;
}

.aitnb-action-buttons-container .button {
	flex: 1 1 auto;
	margin: 0;
}

/* ==========================================================================
   2.0 - AR Modal Styles
   ========================================================================== */

/* 2.1 - Main Container & Overlay
   -------------------------------------------------------------------------- */
.aitnb-ar-container,
.aitnb-mv-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.aitnb-ar-container.is-visible,
.aitnb-mv-container.is-visible {
	opacity: 1;
	visibility: visible;
}

.aitnb-ar-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.75);
	z-index: 1;
}

/* 2.2 - Modal Structure
   -------------------------------------------------------------------------- */
.aitnb-ar-modal {
	position: relative;
	width: 95%;
	height: 95%;
	max-width: 1400px;
	background-color: #ffffff;
	z-index: 2;
	display: flex;
	flex-direction: column;
	border-radius: 4px;
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* 2.3 - Header, Body, Footer
   -------------------------------------------------------------------------- */
.aitnb-ar-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 20px;
	border-bottom: 1px solid #eeeeee;
	flex-shrink: 0;
}

.aitnb-ar-header h3 {
	margin: 0;
	font-size: 18px;
}

.aitnb-close-btn {
	background: none;
	border: none;
	font-size: 28px;
	font-weight: bold;
	line-height: 1;
	cursor: pointer;
	padding: 5px;
	color: #888;
}
.aitnb-close-btn:hover {
	color: #000;
}

.aitnb-ar-body {
	flex-grow: 1;
	position: relative;
	overflow: hidden;
	background-color: #333;
	display: flex;
	flex-direction: column;
}

.aitnb-ar-footer {
	padding: 10px 20px;
	border-top: 1px solid #eeeeee;
	text-align: center;
	flex-shrink: 0;
	background-color: #f7f7f7;
}

.aitnb-ar-footer .aitnb-instructions {
	margin: 0;
	font-size: 13px;
	color: #555;
}

/* 2.4 - Loader & Scene
   -------------------------------------------------------------------------- */
.aitnb-loader {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(255, 255, 255, 0.9);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 3;
}

.aitnb-loader p {
	font-size: 16px;
	font-weight: bold;
}

.aitnb-ar-scene-placeholder {
	width: 100%;
	height: 100%;
	flex-grow: 1;
	position: relative;
}

/* 2.5 - Model Viewer Element
   -------------------------------------------------------------------------- */
model-viewer {
	width: 100%;
	height: 100%;
	flex-grow: 1;
}

/* 2.6 - AR UI Controls
   -------------------------------------------------------------------------- */
.aitnb-position-controls {
	position: absolute;
	right: 15px;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.aitnb-controls-group {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.aitnb-control-btn {
	width: 40px;
	height: 40px;
	font-size: 24px;
	line-height: 1;
	border-radius: 50%;
	border: 1px solid #fff;
	background: rgba(0,0,0,0.5);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.aitnb-control-btn:hover {
	background: rgba(0,0,0,0.7);
}