/* ==========================================================================
   Mobile / Portrait Layout - COMPLETELY SEPARATE EXPERIENCE
   ========================================================================== */
/* This file is conditionally loaded via media="(orientation: portrait)" in index.html */

:root
{
	--header-height: auto;
	--header-height-condensed: auto;
}

/* Reset body for mobile - natural document flow scrolling */
html,
body
{
	height: auto;
	min-height: 100vh;
	overflow-x: hidden;
	overflow-y: auto;
}

/* Main content should flow naturally */
main.main-content
{
	height: auto;
	min-height: 100vh;
	overflow: visible;
	padding-bottom: 100px; /* Space for fixed bug report button */
}

.crt
{
	margin: var( --margin-main-gap ) var( --margin-main-gap ) var( --margin-main-gap ) var( --margin-main-gap );
}

/* Hide StatusBar on mobile */
#StatusBar
{
	display: none !important;
}

/* Bug Report Button - Mobile optimized */
.bug-report-container
{
	bottom: var(--space-md);
	right: var(--space-md);

	margin: 0;
}

.bug-report-container .status-bug-report
{
	display: flex;

	min-width: 56px;
	min-height: 56px;

	padding: var(--space-md);

	align-items: center;
	justify-content: center;

	background: #33333399;
/*
	border-radius: 50%;
	background: var(--color-accent);
	border-color: var(--color-accent);
	color: var(--color-bg-primary);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
*/
}

.bug-report-container .status-bug-report:hover
{
	background: var(--color-accent-bright);
	border-color: var(--color-accent-bright);
	transform: scale(1.05);
}

.bug-report-container .bug-icon
{
	font-size: 1.5rem;
}

/* Header stacks vertically */
.main-header
{
	flex-direction: column;
	padding: var(--space-md);
	gap: var(--space-md);
}

/* Mobile header search styling */
.header-search
{
	width: 100%;
	max-width: 100%;
	order: 2;
}

.header-search .search-input
{
	width: 100%;
}

.main-header.header-home,
.main-header.header-condensed
{
	justify-content: center;
}

.main-header.header-home .header-search,
.main-header.header-condensed .header-search
{
	order: 2;
	margin: var(--space-md) 0;
}

#logo-img
{
	width: 96px !important;
	height: 96px !important;
}

.main-header.header-condensed #logo-img
{
	width: 64px !important;
	height: 64px !important;
}

.main-header.header-home .logo-container,
.main-header.header-condensed .logo-container
{
	order: 1;
}

.auth-section
{
	margin-left: 0;
}

/* On mobile, auth section stays in header flow for home view */
.main-header.header-home .auth-section
{
	position: relative;
	top: auto;
	right: auto;
	order: 3;
	margin-top: var(--space-md);
	margin-left: 0;
}

/* On mobile condensed view, auth section stays in top right */
.main-header.header-condensed .auth-section
{
	position: absolute;
	top: var(--space-sm);
	right: var(--space-sm);
	margin-left: 0;
}

.user-name
{
	max-width: 150px;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Views become normal flow elements */
.view
{
	position: static;
	height: auto;
	overflow: visible;
	padding: var(--space-md);
	border: none;
	border-radius: 0;
}

/* Landing View Mobile */
.landing-container
{
	display: block;
}

.search-section
{
	max-width: none;
	margin-bottom: var(--space-xl);
}

.hero-cards
{
	grid-template-columns: 1fr;
	gap: var(--space-md);
}

.hero-card
{
	flex-direction: row;
	text-align: left;
	align-items: center;
}

.card-icon
{
	width: 48px;
	height: 48px;
	margin: 0;
	flex-shrink: 0;
}

.card-icon svg
{
	width: 24px;
	height: 24px;
}

/* Browser View Mobile */
.mosaic-container
{
	grid-template-columns: repeat(2, 1fr);
	max-height: none;
}

/* Wizard View Mobile */
.wizard-container
{
	flex-direction: column;
}

.wizard-summary-panel
{
	flex: 0 0 auto;
	order: -1;
	max-height: 250px;
	width: 100%;
}

.wizard-content
{
	padding: var(--space-md);
}

.wizard-header
{
	margin-bottom: var(--space-sm);
}

.back-btn
{
	width: 100%;
	justify-content: center;
	margin-bottom: var(--space-md);
}

/* Keep the rest of your mobile wizard styles */
.wizard-container
{
	flex-direction: column;
}

.wizard-summary-panel
{
	flex: 0 0 auto;
	order: -1;
	max-height: none;
}

.wizard-content
{
	padding: var(--space-md);
}

.option-buttons
{
	grid-template-columns: 1fr;
}

.summary-actions
{
	flex-direction: column;
}

.summary-actions
{
	flex-direction: column;
}

.summary-actions button
{
	width: 100%;
}

/* Client Area Mobile */
.login-container
{
	max-width: none;
	padding: var(--space-md);
}

.dashboard-grid
{
	grid-template-columns: 1fr;
}

.dashboard-column-side
{
	order: -1;
}

.documents-grid
{
	grid-template-columns: 1fr;
}

.messages-container
{
	min-height: 200px;
	max-height: none;
}

.message-input-container
{
	flex-direction: column;
}

.message-input-container button
{
	align-self: stretch;
}

.table-wrapper
{
	border: none;
}

.request-table
{
	font-size: 0.9rem;
}

.request-table th,
.request-table td
{
	padding: var(--space-xs) var(--space-sm);
}

/* ==========================================================================
   MODULAR CLIENT AREA - MOBILE STYLES
   ========================================================================== */

/* Sub-navigation mobile */
.sub-nav
{
	flex-wrap: wrap;
	justify-content: center;
}

.sub-nav-tab
{
	padding: var(--space-sm);
	font-size: 0.9rem;
}

.sub-nav-tab .tab-label
{
	display: none;
}

/* Section content grid - single column on mobile */
.section-content-grid
{
	grid-template-columns: 1fr;
	gap: var(--space-md);
}

.panel-container
{
	min-height: auto;
}

/* Profile section mobile */
.user-info-card
{
	flex-direction: column;
	text-align: center;
}

.user-avatar-large
{
	width: 48px;
	height: 48px;
	font-size: 1.2rem;
}

/* Company section mobile */
.company-info-card
{
	flex-direction: column;
	text-align: center;
}

.members-list
{
	justify-content: center;
}

/* Services section mobile */
.services-content.desktop-split-view
{
	grid-template-columns: 1fr;
	height: auto;
	min-height: auto;
}

.services-list-panel
{
	display: none;
}

.services-content.mobile-view .services-list-panel
{
	display: flex;
}

.services-detail-panel
{
	padding: var(--space-md);
}

.service-item-title
{
	font-size: 0.9rem;
}

.service-detail-header
{
	flex-wrap: wrap;
	gap: var(--space-sm);
}

.service-title
{
	font-size: 1rem;
	width: 100%;
}

.info-grid
{
	grid-template-columns: 1fr;
}

.service-content-grid
{
	grid-template-columns: 1fr;
}

/* Timeline mobile */
.timeline-steps
{
	padding-left: var(--space-lg);
}

.step-indicator
{
	left: -28px;
	width: 20px;
	height: 20px;
	font-size: 0.75rem;
}

.step-connector
{
	left: -20px;
}

/* Chat panel mobile */
.chat-messages
{
	max-height: none;
}

.chat-input-container
{
	flex-direction: column;
}

.chat-send-btn
{
	align-self: stretch;
}

/* Document panel mobile */
.document-item
{
	flex-wrap: wrap;
}

.doc-name
{
	width: 100%;
	order: 3;
	margin-top: var(--space-xs);
}

/* Auth forms mobile */
.auth-form-wrapper
{
	padding: 0 var(--space-sm);
}

.dialog-content
{
	padding: var(--space-lg);
	margin: var(--space-md);
}

.dialog-actions
{
	flex-direction: column;
}

.dialog-actions button
{
	width: 100%;
}

.dialog-choices
{
	max-height: none;
	overflow-y: visible;
}
