/* Стили для мобильной версии */
@media only screen and (max-width: 480px) {
    /* Ваши стили для мобильных устройств */

	.container{
		display: flex;
		flex-direction: row;
		height: 100vh;
		justify-content:safe;
		align-items:flex-start;
		gap: 0;
	}
	.left{
		display: none;
		flex-direction: column;
		width: 2rem;
		height: 2rem;
		justify-content: space-between;
		align-items: stretch;
		gap: 0;
	}
	.logo{
		height: 8rem;
		display: flex;
		justify-content: center;
		justify-items: center;	
		background: url('../img/logo.svg') no-repeat;
		background-position: center;
		background-size: 5.25rem 5.25rem;
		opacity: 0.75;
	}
	.nav{
		flex-grow: 1;
		display: flex;
		flex-direction: column;
		justify-content: flex-end;
	}
	.right{
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		align-items: stretch;
		width: 15rem;
		gap: 0;
		flex-grow: 1;
	}
	.header {
		display: flex;
		justify-content: flex-end;
		align-items: center;
		min-height: 2rem;
		padding-right: 1rem;
		width: 100%;
	}
	.exitBtn {
		width: 2rem;
		height: 2rem;
		background: url("../img/icons/menu-w.svg") center no-repeat;
		background-size: contain;
	}
	.exitBtnActive {
		transform: rotate(90deg);
	}
	.main {
		max-height: calc(100% - 4rem);
		background-color: var(--c-bg);
		border-radius: 0;
		flex-grow: 1;
		padding: 0;
	}
	.workarea {
		display: flex;
		flex-direction:row;
		justify-content: space-between;
		justify-items: stretch;
		flex-wrap: nowrap;
		background-color: var(--c-bg-light);
		border-radius: 0;
		width: 100%;
		height: 100%;
		overflow: hidden;
	}
	#contactsPanel {
		display: none;
		width: 24rem;
		min-width: 24rem;
		background-color: var(--c-w);
		border-right: 0.3px var(--c-grey-medium) solid;
		color: var(--c-f);
	}
	.contactHeader {
		width: 100%;
		height: 2rem;
		background-color: var(--c-bg-light);
	}
	.contactList {
		width: 100%;
		background-color: var(--c-w);
		margin-top: 0.5rem;
		border-top: 1px var(--c-grey-medium) solid;
	}
	.contactList::before {
		content: "Контакты";
		display: block;
		color:  var(--c-m);
		padding: 1rem 0 1rem 3rem;
		font-weight: bold;
	}
	.contactItem {
		display: flex; 
		align-items: center;
		width: 100%;
		height: 3rem;
		line-height: 3rem;
		font-weight: bold;
		cursor: pointer;
	}
	.contactItem:hover {
		background-color: var(--c-active);
		color: var(--c-m);
	}
	.contactItem::before {
		display: inline-block;
		width: 1.5rem;
		height: 1.5rem;
		margin: 0.75rem;
		content: "";
		background: url("") no-repeat center;
	}
	[data-icon='org']::before {
		background: url("../img/icons/org.svg") no-repeat center;
	}
	[data-icon='gm']::before {
		background: url("../img/icons/gm.svg") no-repeat center;
	}
	.contactSearch {
		display: flex; 
		align-items: center;
		justify-content: center;
		width: 100%;
		height: 4rem;
	}

	.searchText {
		width: calc( 100% - 2.5rem );
		height: 1.5rem;
		border-bottom: 3px var(--c-grey-light) solid;
		outline: none;
		padding-left: var(--s-1);
	}
	.searchText::after {
		width: 1.5rem;
		height: 1.5rem;
		content: "";
		background: url("../img/icons/search.svg") no-repeat center;
		float: right;
	}
	.searchText:focus {
		border-bottom:1px var(--c-m-50) solid;
	}
	/* ******************************************** main panel *********************************** */
	#mainPanel {
		width: 100%;
		display: flex;
		flex-direction: column;
		justify-content: stretch;
		justify-items: stretch;
		margin-left:0;
		background-color: var(--c-w);
		color: var(--c-f);

	}
	.mainPanelHeader {
		display: flex;
		justify-content: flex-start;
		align-items: center;
		min-height: 4.5rem;
		z-index: 100;
	}
	.backBtn {
		display: inline-block;
		width: var(--s-15);
		height: var(--s-15);
		background: url("../img/icons/back.svg");
		margin-left: var(--s-05);
		cursor: pointer;
	}
	.backBtn:hover {
		box-shadow: 0 0 0.25rem var(--c-m-50);
	}
	.mainPanelIcon {
		display: inline-block;
		width: var(--s-2);
		height: var(--s-2);
		background: no-repeat center;
		background-size: cover;
		margin-left: var(--s-05);
	}
	.mainPanelName {
		height: var(--s-15);
		line-height: var(--s-15);
		flex-grow: 1;
		font-weight: normal;
		margin-left: 0;
	}
	.messageArea {
		overflow-y: scroll;
		flex-grow: 1;
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		align-items: start;
		padding: 0;
		position: relative;
	}
	.messageArea::-webkit-scrollbar-thumb {
		background-color: #005475; /* Цвет ползунка scrollbar */
	}
	.messageAreaBg {
		order: 101;
		position:sticky;
		bottom: -1.3rem;
		margin-bottom: -2.5rem;
		background: linear-gradient(to right, #FFFFFF, 40%, #FFFFFF00), url() no-repeat right 0;
		background-size:cover;
		width: 100%;
		min-height: 95%;
		z-index: 0;
	}
	.uniEditor {
		display: flex;
		justify-content: flex-start;
		align-items: center;
		min-height: 4.5rem;
		padding: 1rem 0;
	}
	.editorPreBtns,
	.editorAfterBtns {
		display: inline-block;
		width: 7.5rem;
		min-width: 7.5rem;
		height: var(--s-15);
		margin-left: var(--s-15);
		text-align: center;
	}
	.editorText {
		flex-grow: 1;
		min-height: 2.25rem;
		line-height: var(--s-15);
		font-weight:normal;
		outline: none;
		border: 1px var(--c-grey-medium) solid;
		border-radius: var(--s-125);
		padding: 0.25rem 1rem;
	}
	.editorAttachBtn {
		display: inline-block;
		width: var(--s-15);
		height: var(--s-15);
		margin-right: var(--s-075);
		background: url("../img/icons/attach.svg") no-repeat center;
	}
	.editorSendBtn {
		display: inline-block;
		width: var(--s-15);
		height: var(--s-15);
		margin-right: var(--s-075);
		background: url("../img/icons/send.svg") no-repeat center;
	}
	.message {
		width: auto;
		max-width: 100%;
		word-wrap: break-word;
		height: auto;
		background-color: var(--c-w);
		border-radius: 0;
		padding: 0.5rem 1.25rem;
		margin-bottom: 0rem;
		font-size: var(--s-075);
		line-height: var(--s-15);
		z-index: 1;
	}
	.qr  {
		display: flex;
		align-items: center;
		width: auto;
		height: auto;
		background-color: var(--c-w);
		border-radius: 0;
		padding: 0 0.5rem;
		margin-bottom: 0.25rem;
		cursor: pointer;
		color: var(--c-m);
		font-style: italic;
		text-decoration: underline;
		z-index: 1;
	}
	.messageAreaBtnGroup {
		order: 100;
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		color: var(--c-f-w);
		padding-top: 1rem;
		z-index: 1;
	}
	.messageAreaBtn {
		background-color: var(--c-m);
		border-radius: 0 var(--s-1) var(--s-1) 0;
		height: 2.25rem;
		width: 100%;
		line-height: 2.25rem;
		padding: 0 2rem;
		margin-bottom: 1rem;
		cursor: pointer;
		font-size: 0.75rem;
	}
	.messageAreaBtn:first-child {
		border-top-left-radius: var(--s-1);
	}
	.messageAreaBtn:last-child {
		border-bottom-left-radius: var(--s-1);
	}

}

/* Стили для настольной версии */
@media only screen and (min-width: 601px) {
    /* Ваши стили для настольных устройств */
	.container{
		display: flex;
		flex-direction: row;
		height: 100vh;
		justify-content: space-between;
		align-items: stretch;
		gap: 0;
	}
	.left{
		display: flex;
		flex-direction: column;
		width: 8rem;
		justify-content: space-between;
		align-items: stretch;
		gap: 0;
	}
	.logo{
		height: 8rem;
		display: flex;
		justify-content: center;
		justify-items: center;	
		background: url('../img/logo.svg') no-repeat;
		background-position: center;
		background-size: 5.25rem 5.25rem;
		opacity: 0.75;
	}
	.nav{
		flex-grow: 1;
		display: flex;
		flex-direction: column;
		justify-content: flex-end;
	}
	.right{
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		align-items: stretch;
		width: 15rem;
		gap: 0;
		flex-grow: 1;
	}
	.header {
		display: flex;
		justify-content: flex-end;
		align-items: center;
		min-height: 4rem;
		padding-right: 1rem;
		width: 100%;
	}
	.exitBtn {
		width: 2rem;
		height: 2rem;
		background: url("../img/exitBtn-w.svg") center no-repeat;
		background-size: contain;
	}
	.exitBtn:hover {
		background-image: url("../img/exitBtn.svg");
	}
	.main {
		max-height: calc(100% - 4rem);
		background-color: var(--c-bg);
		border-radius: 1rem 0 0 0;
		flex-grow: 1;
		padding: 1rem;
	}
	.workarea {
		display: flex;
		flex-direction:row;
		justify-content: space-between;
		justify-items: stretch;
		flex-wrap: nowrap;
		background-color: var(--c-bg-light);
		border-radius: 1rem 0 0 0.5rem;
		width: 100%;
		height: 100%;
		overflow: hidden;
	}
	#contactsPanel {
		display: inline-block;
		width: 24rem;
		min-width: 24rem;
		background-color: var(--c-w);
		border-right: 0.3px var(--c-grey-medium) solid;
		color: var(--c-f);
	}
	.contactHeader {
		width: 100%;
		height: 2rem;
		background-color: var(--c-bg-light);
	}
	.contactList {
		width: 100%;
		background-color: var(--c-w);
		margin-top: 0.5rem;
		border-top: 1px var(--c-grey-medium) solid;
	}
	.contactList::before {
		content: "Контакты";
		display: block;
		color:  var(--c-m);
		padding: 1rem 0 1rem 3rem;
		font-weight: bold;
	}
	.contactItem {
		display: flex; 
		align-items: center;
		width: 100%;
		height: 3rem;
		line-height: 3rem;
		font-weight: bold;
		cursor: pointer;
	}
	.contactItem:hover {
		background-color: var(--c-active);
		color: var(--c-m);
	}
	.contactItem::before {
		display: inline-block;
		width: 1.5rem;
		height: 1.5rem;
		margin: 0.75rem;
		content: "";
		background: url("") no-repeat center;
	}
	[data-icon='org']::before {
		background: url("../img/icons/org.svg") no-repeat center;
	}
	[data-icon='gm']::before {
		background: url("../img/icons/gm.svg") no-repeat center;
	}
	.contactSearch {
		display: flex; 
		align-items: center;
		justify-content: center;
		width: 100%;
		height: 4rem;
	}

	.searchText {
		width: calc( 100% - 2.5rem );
		height: 1.5rem;
		border-bottom: 3px var(--c-grey-light) solid;
		outline: none;
		padding-left: var(--s-1);
	}
	.searchText::after {
		width: 1.5rem;
		height: 1.5rem;
		content: "";
		background: url("../img/icons/search.svg") no-repeat center;
		float: right;
	}
	.searchText:focus {
		border-bottom:1px var(--c-m-50) solid;
	}
	/* ******************************************** main panel *********************************** */
	#mainPanel {
		flex-grow: 1;
		display: flex;
		flex-direction: column;
		justify-content: stretch;
		justify-items: stretch;
		margin-left: 1.5rem;
		background-color: var(--c-w);
		color: var(--c-f);

	}
	.mainPanelHeader {
		display: flex;
		justify-content: flex-start;
		align-items: center;
		min-height: 4.5rem;
	}
	.backBtn {
		display: inline-block;
		width: var(--s-15);
		height: var(--s-15);
		background: url("../img/icons/back.svg");
		margin-left: var(--s-075);
		cursor: pointer;
	}
	.backBtn:hover {
		box-shadow: 0 0 0.25rem var(--c-m-50);
	}
	.mainPanelIcon {
		display: inline-block;
		width: var(--s-3);
		height: var(--s-3);
		background: no-repeat center;
		background-size: cover;
		margin-left: var(--s-075);
	}
	.mainPanelName {
		height: var(--s-15);
		line-height: var(--s-15);
		flex-grow: 1;
		font-weight: bold;
		margin-left: var(--s-15);
	}
	.messageArea {
		overflow-y: scroll;
		flex-grow: 1;
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		align-items: start;
		padding: 1.5rem 3.25rem;
		position: relative;
	}
	.messageArea::-webkit-scrollbar-thumb {
		background-color: #005475; /* Цвет ползунка scrollbar */
	}
	.messageAreaBg {
		order: 101;
		position:sticky;
		bottom: -1.3rem;
		margin-bottom: -2.5rem;
		background: linear-gradient(to right, #FFFFFF, 40%, #FFFFFF00), url() no-repeat right 0;
		background-size:cover;
		width: 100%;
		min-height: 95%;
		z-index: 0;
	}
	.uniEditor {
		display: flex;
		justify-content: flex-start;
		align-items: center;
		min-height: 4.5rem;
		padding: 1rem 0;
	}
	.editorPreBtns,
	.editorAfterBtns {
		display: inline-block;
		width: 7.5rem;
		min-width: 7.5rem;
		height: var(--s-15);
		margin-left: var(--s-15);
		text-align: center;
	}
	.editorText {
		flex-grow: 1;
		min-height: 2.25rem;
		line-height: var(--s-15);
		font-weight:normal;
		outline: none;
		border: 1px var(--c-grey-medium) solid;
		border-radius: var(--s-125);
		padding: 0.25rem 1rem;
	}
	.editorAttachBtn {
		display: inline-block;
		width: var(--s-15);
		height: var(--s-15);
		margin-right: var(--s-075);
		background: url("../img/icons/attach.svg") no-repeat center;
	}
	.editorSendBtn {
		display: inline-block;
		width: var(--s-15);
		height: var(--s-15);
		margin-right: var(--s-075);
		background: url("../img/icons/send.svg") no-repeat center;
	}
	.message {
		min-width: 20rem;
		width: auto;
		word-wrap: break-word;
		height: auto;
		background-color: var(--c-bg-light);
		border-radius: 0 1rem 1rem 1rem;
		padding: 1rem 1.25rem;
		margin-bottom: 1rem;
		font-size: var(--s-1);
		line-height: var(--s-15);
		z-index: 1;
	}
	.qr  {
		display: flex;
		align-items: center;
		width: auto;
		height: auto;
		background-color: var(--c-bg-light);
		border-radius: 0 1rem 1rem 1rem;
		padding: 0 1rem;
		margin-bottom: 1rem;
		cursor: pointer;
		color: var(--c-m);
		font-style: italic;
		text-decoration: underline;
		z-index: 1;
	}
	.messageAreaBtnGroup {
		order: 100;
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		color: var(--c-f-w);
		padding-top: 1rem;
		z-index: 1;
	}
	.messageAreaBtn {
		background-color: var(--c-m);
		border-radius: 0 var(--s-1) var(--s-1) 0;
		height: 2.25rem;
		width: auto;
		line-height: 2.25rem;
		padding: 0 2rem;
		margin-bottom: 1rem;
		cursor: pointer;
	}
	.messageAreaBtn:first-child {
		border-top-left-radius: var(--s-1);
	}
	.messageAreaBtn:last-child {
		border-bottom-left-radius: var(--s-1);
	}
}