/* ==========================================================================
   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;
}
