/**
 * Free Resume Builder
 *
 * Responsive layout system.
 *
 * @package Free_Resume_Builder
 */


/* ==========================================================================
   1. Global Responsive Safety
   ========================================================================== */

.rm-page,
.rm-app-shell,
.rm-site-header,
.rm-site-footer,
.rm-builder,
.rm-dashboard,
.rm-templates-page,
.rm-auth-page,
.rm-modal,
.rm-toast-container {
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.rm-page *,
.rm-app-shell *,
.rm-site-header *,
.rm-site-footer *,
.rm-builder *,
.rm-dashboard *,
.rm-templates-page *,
.rm-auth-page * {
	max-width: 100%;
}

.rm-page img,
.rm-app-shell img,
.rm-builder img,
.rm-dashboard img,
.rm-templates-page img,
.rm-auth-page img {
	max-width: 100%;
	height: auto;
}

.rm-page iframe,
.rm-page video,
.rm-app-shell iframe,
.rm-app-shell video {
	max-width: 100%;
}

.rm-page pre,
.rm-app-shell pre {
	max-width: 100%;
	overflow-x: auto;
}

.rm-page code,
.rm-app-shell code {
	overflow-wrap: anywhere;
	word-break: break-word;
}


/* ==========================================================================
   2. Responsive Containers
   ========================================================================== */

@media (min-width: 1200px) {

	.rm-container {
		width: min(
			calc(100% - 64px),
			1240px
		);
	}

	.rm-content-container {
		width: min(
			calc(100% - 64px),
			860px
		);
	}

}


@media (min-width: 1600px) {

	.rm-container {
		width: min(
			calc(100% - 80px),
			1320px
		);
	}

}


/* ==========================================================================
   3. Large Desktop
   ========================================================================== */

@media (min-width: 1200px) {

	.rm-site-header .rm-header-inner {
		width: min(
			calc(100% - 64px),
			1240px
		);
	}

	.rm-footer-container,
	.rm-footer-bottom-inner {
		width: min(
			calc(100% - 64px),
			1240px
		);
	}

}


/* ==========================================================================
   4. Desktop / Laptop
   ========================================================================== */

@media (min-width: 901px) {

	.rm-mobile-menu-toggle,
	.rm-mobile-navigation {
		display: none !important;
	}

	.rm-desktop-nav {
		display: flex;
	}

	.rm-header-inner {
		flex-wrap: nowrap;
	}

	.rm-site-header {
		overflow: visible;
	}

	.rm-navigation-dropdown-menu,
	.rm-user-dropdown {
		max-height: calc(100vh - 90px);
		overflow-y: auto;
	}

}


/* ==========================================================================
   5. Tablet Landscape
   ========================================================================== */

@media (max-width: 1100px) and (min-width: 769px) {

	.rm-header-inner {
		width: calc(100% - 32px);
		gap: 14px;
	}

	.rm-brand-copy {
		max-width: 190px;
	}

	.rm-brand-name {
		font-size: 0.9rem;
	}

	.rm-main-navigation {
		gap: 5px;
	}

	.rm-navigation-link {
		padding-right: 8px;
		padding-left: 8px;
		font-size: 0.8rem;
	}

	.rm-navigation-secondary-link {
		display: none;
	}

	.rm-navigation-register-link {
		padding-right: 10px;
		padding-left: 10px;
	}

	.rm-footer-container {
		gap: 30px;
	}

}


/* ==========================================================================
   6. Tablet
   ========================================================================== */

@media (max-width: 900px) {

	.rm-site-header {
		width: 100%;
	}

	.rm-header-inner {
		width: calc(100% - 28px);
		min-height: 64px;
	}

	.rm-desktop-nav,
	.rm-main-navigation {
		display: none !important;
	}

	.rm-mobile-menu-toggle {
		display: inline-flex;
	}

	.rm-mobile-navigation:not([hidden]) {
		display: block;
	}

	.rm-header-actions {
		gap: 7px;
	}

	.rm-header-dashboard,
	.rm-login-link {
		display: none;
	}

	.rm-header-cta {
		min-height: 40px;
	}

	.rm-footer-container {
		grid-template-columns:
			repeat(2, minmax(0, 1fr));
	}

	.rm-footer-brand {
		grid-column: 1 / -1;
	}

}


/* ==========================================================================
   7. Tablet Portrait
   ========================================================================== */

@media (max-width: 768px) {

	.rm-container {
		width: calc(100% - 28px);
	}

	.rm-content-container {
		width: calc(100% - 28px);
	}

	.rm-page h1 {
		font-size: clamp(
			1.85rem,
			6vw,
			2.7rem
		);
	}

	.rm-page h2 {
		font-size: clamp(
			1.5rem,
			5vw,
			2.1rem
		);
	}

	.rm-page h3 {
		font-size: 1.25rem;
	}

	.rm-card-header {
		flex-wrap: wrap;
	}

	.rm-card-footer {
		flex-wrap: wrap;
	}

	.rm-footer-container {
		gap: 30px 24px;
	}

	.rm-footer-bottom-inner {
		grid-template-columns: 1fr;
		justify-items: center;
		gap: 9px;
		padding: 18px 0;
		text-align: center;
	}

	.rm-footer-made-with {
		justify-self: center;
	}

	.rm-modal {
		padding: 16px;
	}

	.rm-modal-dialog {
		max-height: calc(100vh - 32px);
	}

	.rm-export-options {
		grid-template-columns:
			repeat(2, minmax(0, 1fr));
	}

}


/* ==========================================================================
   8. Large Phones
   ========================================================================== */

@media (max-width: 600px) {

	.rm-container,
	.rm-content-container {
		width: calc(100% - 24px);
	}

	.rm-header-inner {
		width: calc(100% - 24px);
	}

	.rm-brand-mark {
		width: 36px;
		height: 36px;
	}

	.rm-brand-tagline {
		display: none;
	}

	.rm-brand-name {
		max-width: 180px;
		font-size: 0.875rem;
	}

	.rm-header-cta {
		width: 40px;
		height: 40px;
		padding: 0;
	}

	.rm-header-cta span {
		display: none;
	}

	.rm-footer-container {
		grid-template-columns: 1fr;
		width: calc(100% - 24px);
	}

	.rm-footer-brand {
		grid-column: auto;
	}

	.rm-footer-bottom-inner {
		width: calc(100% - 24px);
	}

	.rm-footer-bottom-links {
		flex-wrap: wrap;
	}

	.rm-modal {
		align-items: flex-end;
		padding: 0;
	}

	.rm-modal-dialog {
		width: 100%;
		max-width: 100% !important;
		max-height: calc(100vh - 8px);
		border-radius:
			var(--rm-radius-xl)
			var(--rm-radius-xl)
			0
			0;
	}

	.rm-modal-header {
		padding: 18px;
	}

	.rm-modal-body {
		padding: 18px;
	}

	.rm-modal-footer {
		padding: 14px 18px;
	}

	.rm-toast-container {
		right: 10px;
		bottom: 10px;
		left: 10px;
		width: auto;
	}

	.rm-toast {
		width: 100%;
	}

	.rm-empty-state {
		padding: 42px 12px;
	}

	.rm-empty-state-actions {
		width: 100%;
		flex-direction: column;
	}

	.rm-empty-state-button {
		width: 100%;
		max-width: 340px;
	}

}


/* ==========================================================================
   9. Standard Phone
   ========================================================================== */

@media (max-width: 480px) {

	.rm-container,
	.rm-content-container {
		width: calc(100% - 20px);
	}

	.rm-header-inner {
		width: calc(100% - 20px);
		gap: 7px;
	}

	.rm-brand {
		min-width: 0;
	}

	.rm-brand-name {
		max-width: 145px;
		overflow: hidden;
		font-size: 0.84rem;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.rm-brand-mark {
		width: 34px;
		height: 34px;
	}

	.rm-header-actions {
		gap: 5px;
	}

	.rm-mobile-menu-toggle {
		width: 39px;
		height: 39px;
	}

	.rm-header-cta {
		width: 39px;
		height: 39px;
	}

	.rm-mobile-navigation-inner {
		width: calc(100% - 20px);
	}

	.rm-footer-container {
		width: calc(100% - 20px);
	}

	.rm-footer-bottom-inner {
		width: calc(100% - 20px);
	}

	.rm-footer-main {
		padding-top: 42px;
		padding-bottom: 36px;
	}

	.rm-footer-heading {
		margin-bottom: 12px !important;
	}

	.rm-footer-links {
		gap: 9px;
	}

	.rm-export-options {
		grid-template-columns: 1fr;
	}

	.rm-export-option {
		min-height: 68px;
	}

	.rm-export-footer {
		display: grid;
		grid-template-columns: 1fr 1fr;
	}

	.rm-export-footer .rm-modal-button {
		width: 100%;
	}

}


/* ==========================================================================
   10. Small Phone
   ========================================================================== */

@media (max-width: 390px) {

	.rm-header-inner {
		width: calc(100% - 16px);
	}

	.rm-brand-name {
		max-width: 125px;
		font-size: 0.8rem;
	}

	.rm-brand-mark {
		width: 32px;
		height: 32px;
	}

	.rm-mobile-menu-toggle {
		width: 37px;
		height: 37px;
	}

	.rm-header-cta {
		width: 37px;
		height: 37px;
	}

	.rm-mobile-navigation-inner {
		width: calc(100% - 16px);
	}

	.rm-mobile-nav-link {
		min-height: 43px;
		font-size: 0.875rem;
	}

	.rm-footer-container,
	.rm-footer-bottom-inner {
		width: calc(100% - 16px);
	}

	.rm-modal-header,
	.rm-modal-body {
		padding-right: 15px;
		padding-left: 15px;
	}

	.rm-modal-footer {
		padding-right: 15px;
		padding-left: 15px;
	}

	.rm-export-footer {
		grid-template-columns: 1fr;
	}

	.rm-empty-state-title {
		font-size: 1.2rem !important;
	}

	.rm-empty-state-message {
		font-size: 0.84rem !important;
	}

}


/* ==========================================================================
   11. Very Small Devices — 320px
   ========================================================================== */

@media (max-width: 360px) {

	.rm-header-inner {
		width: calc(100% - 12px);
	}

	.rm-brand-name {
		max-width: 105px;
		font-size: 0.76rem;
	}

	.rm-brand-mark {
		width: 30px;
		height: 30px;
	}

	.rm-header-actions {
		gap: 3px;
	}

	.rm-mobile-menu-toggle,
	.rm-header-cta {
		width: 35px;
		height: 35px;
	}

	.rm-mobile-menu-toggle {
		padding: 7px;
	}

	.rm-mobile-menu-toggle span {
		width: 16px;
	}

	.rm-mobile-navigation-inner {
		width: calc(100% - 12px);
	}

	.rm-mobile-create-button {
		min-height: 44px;
		font-size: 0.875rem;
	}

	.rm-footer-container,
	.rm-footer-bottom-inner {
		width: calc(100% - 12px);
	}

	.rm-footer-logo-text {
		font-size: 0.9rem;
	}

	.rm-footer-description {
		font-size: 0.78rem !important;
	}

	.rm-footer-bottom-links {
		gap: 6px;
		font-size: 0.65rem;
	}

	.rm-toast-container {
		right: 7px;
		bottom: 7px;
		left: 7px;
	}

	.rm-toast {
		padding-right: 38px;
	}

	.rm-toast-title {
		font-size: 0.76rem;
	}

	.rm-toast-message {
		font-size: 0.69rem;
	}

}


/* ==========================================================================
   12. Touch Devices
   ========================================================================== */

@media (hover: none) and (pointer: coarse) {

	.rm-navigation-link,
	.rm-mobile-nav-link,
	.rm-dropdown-link,
	.rm-footer-links a,
	.rm-button,
	.rm-modal-button,
	.rm-export-option,
	.rm-empty-state-button {
		-webkit-tap-highlight-color: transparent;
	}

	.rm-navigation-link:hover,
	.rm-dropdown-link:hover,
	.rm-footer-links a:hover {
		transform: none;
	}

	.rm-mobile-nav-link {
		min-height: 46px;
	}

	.rm-modal-button {
		min-height: 44px;
	}

	.rm-export-option {
		min-height: 70px;
	}

}


/* ==========================================================================
   13. Landscape Phones
   ========================================================================== */

@media (max-width: 900px) and (orientation: landscape) {

	.rm-mobile-navigation-inner {
		max-height: calc(100vh - 64px);
		overflow-y: auto;
	}

	.rm-modal-dialog {
		max-height: calc(100vh - 12px);
	}

	.rm-modal-body {
		overflow-y: auto;
	}

}


/* ==========================================================================
   14. Short Viewports
   ========================================================================== */

@media (max-height: 600px) and (min-width: 601px) {

	.rm-modal-dialog {
		max-height: calc(100vh - 20px);
	}

	.rm-modal-body {
		overflow-y: auto;
	}

}


/* ==========================================================================
   15. Safe Area — Modern Phones
   ========================================================================== */

@supports (padding: env(safe-area-inset-bottom)) {

	.rm-mobile-navigation-inner {
		padding-bottom:
			max(
				16px,
				env(safe-area-inset-bottom)
			);
	}

	.rm-toast-container {
		bottom:
			max(
				10px,
				env(safe-area-inset-bottom)
			);
	}

}


/* ==========================================================================
   16. Accessibility / Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

	.rm-site-header *,
	.rm-site-footer *,
	.rm-modal *,
	.rm-toast-container *,
	.rm-mobile-navigation *,
	.rm-page *,
	.rm-app-shell * {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}

}


/* ==========================================================================
   17. Forced Colors / High Contrast
   ========================================================================== */

@media (forced-colors: active) {

	.rm-button,
	.rm-header-cta,
	.rm-navigation-register-link,
	.rm-mobile-create-button,
	.rm-footer-primary-button,
	.rm-empty-state-button,
	.rm-modal-button,
	.rm-export-option {
		border: 1px solid ButtonText;
	}

	.rm-modal-overlay {
		background: Canvas;
		opacity: 0.9;
	}

	.rm-form-control,
	.rm-page input,
	.rm-page textarea,
	.rm-page select {
		border: 1px solid ButtonText;
	}

}


/* ==========================================================================
   18. No Hover / Keyboard Focus
   ========================================================================== */

@media (hover: none) {

	.rm-header-cta:hover,
	.rm-footer-primary-button:hover,
	.rm-empty-state-button:hover,
	.rm-modal-button:hover {
		transform: none;
	}

}


/* ==========================================================================
   19. Overflow Protection
   ========================================================================== */

@media (max-width: 768px) {

	.rm-page,
	.rm-app-shell,
	.rm-builder,
	.rm-dashboard,
	.rm-templates-page,
	.rm-auth-page {
		overflow-x: hidden;
	}

	.rm-page .rm-row,
	.rm-app-shell .rm-row,
	.rm-builder .rm-row,
	.rm-dashboard .rm-row,
	.rm-templates-page .rm-row,
	.rm-auth-page .rm-row {
		min-width: 0;
		max-width: 100%;
	}

	.rm-page .rm-grid,
	.rm-app-shell .rm-grid,
	.rm-builder .rm-grid,
	.rm-dashboard .rm-grid,
	.rm-templates-page .rm-grid,
	.rm-auth-page .rm-grid {
		min-width: 0;
	}

}


/* ==========================================================================
   20. Responsive Text Safety
   ========================================================================== */

@media (max-width: 480px) {

	.rm-page h1,
	.rm-page h2,
	.rm-page h3,
	.rm-page h4,
	.rm-page h5,
	.rm-page h6,
	.rm-app-shell h1,
	.rm-app-shell h2,
	.rm-app-shell h3,
	.rm-app-shell h4,
	.rm-app-shell h5,
	.rm-app-shell h6 {
		overflow-wrap: anywhere;
	}

	.rm-page p,
	.rm-app-shell p,
	.rm-page label,
	.rm-app-shell label {
		overflow-wrap: anywhere;
	}

}


/* ==========================================================================
   21. Desktop Wide Layout Safety
   ========================================================================== */

@media (min-width: 1440px) {

	.rm-site-header .rm-header-inner,
	.rm-footer-container,
	.rm-footer-bottom-inner {
		max-width: 1320px;
	}

}


/* ==========================================================================
   22. 1920px+ Displays
   ========================================================================== */

@media (min-width: 1800px) {

	.rm-site-header .rm-header-inner,
	.rm-footer-container,
	.rm-footer-bottom-inner {
		max-width: 1380px;
	}

}