@import url("../reset.css");
@import url("../shared.css");

@import url("../footer.css");
@import url("../header.css");

.app-chat-wrapper {
	width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
}

.app-chat {
	display: flex;
	flex-direction: row;
	height: 600px;
	min-width: 1000px;
	border: 0.5px solid #bcbdc4;
	border-radius: 15px;
	margin-bottom: 65px;
}

.app-chat-info {
	max-width: 15%;
	border-right: 0.5px solid #bcbdc4;

	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	padding: 100px 10px 0;
}

.app-chat-info-btn {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;

	background: none;
	border: none;
	border: 1px solid transparent;
	padding: 5px;
	transition: 0.3s;
	min-width: 50px;
	border-radius: 10px;
}

.app-chat-info-btn__notification {
	position: absolute;
	right: -3px;
	top: -3px;
	background: #ea4335;
	width: 11px;
	height: 11px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 8.5px;
	color: #fff;
	border-radius: 50%;
}

.app-chat-info-btn:hover {
	border-color: #1f4544;
}

.app-chat-info-btn__img {
	max-width: 22px;
	margin-bottom: 5px;
}

.app-chat-info-btn__name {
	font-size: 8px;
}

.app-chat-history {
	max-width: 30%;
	min-width: 20%;
	border-right: 0.5px solid #bcbdc4;
	display: flex;
	flex-direction: column;
}

.app-chat-history-inner {
	padding: 10px 4px 22px;
}

.app-chat-history-input-box {
	padding-bottom: 5px;
}

.app-chat-history-input {
	height: 14px;
	border-radius: 5px;
	border: 0.5px solid #e8e7e7;
	padding: 0 5px;
	font-size: 7px;
	width: 100%;
	color: #bcbdc4;
}

.app-chat-history-input::placeholder {
	color: #bcbdc4;
}

.app-chat-history-filter-box {
	display: flex;
	gap: 5px;
}

.app-chat-history-filter-btn {
	flex: 1;
	border-radius: 8px;
	font-size: 8px;
	color: #000;
	cursor: pointer;
	padding: 8px 6px;
	background: #f5f5f5;

	border: 1px solid transparent;
	font-size: 8px;
}

.app-chat-history-filter-btn--active {
	background: #fff;
	border: 0.8px solid #d2ecf2;
	box-shadow: 0px 4px 4px 0px #00000014;
}

.app-chat-history-list {
	padding: 0 5px 0 22px;
	overflow-y: auto;

	display: flex;
	gap: 24px;
	flex-direction: column;
}

.app-chat-history-list-item {
	display: flex;
	gap: 18px;
    padding: 3px;
}

.app-chat-history-list-item.active {
    border: solid 1px #9ab1a8;
    border-radius: 10px;
}

.app-chat-history-list-item-img-box {
}

.app-chat-history-list-item-img {
}

.app-chat-history-list-content {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.app-chat-history-list-name {
	font-size: 12px;
	color: #5b7178;
}

.app-chat-history-list-time {
	font-size: 8px;
	color: #5b7178;
}

.app-chat-history-list-message {
	font-size: 9px;
	color: #000;
}

.app-chat-title {
	padding: 25px 10px 10px 10px;
	border-bottom: 0.5px solid #bcbdc4;
	font-size: 13px;
}

.app-chat-box {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.app-chat-box-inner {
	display: flex;
	flex-direction: column;
	flex: 1;
	overflow: hidden;
}

.app-chat-box-scroll {
	/* padding-left: 10px; */
	/* padding-top: 30px; */
	overflow-y: auto;
	flex: 1;
}

.app-chat-list {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 35px;
	padding: 65px 35px 10px 35px;
}

.app-chat-list-item {
	display: flex;
	flex-direction: row;
	align-items: center;
	width: 60%;
}

.app-chat-list-item-img-box {
	margin-right: 35px;
}

.app-chat-list-item-img {
	border-radius: 50%;
	width: 65px;
	height: 65px;
}

.app-chat-list-item-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 7px;
	margin-right: 20px;
}

.app-chat-list-item-name {
	font-size: 12px;
	color: #5b7178;
}

.app-chat-list-item-message {
	background: #99b1a7;

	padding: 10px 15px;
	min-height: 65px;
	border-radius: 15px 15px 15px 0;
}

.app-chat-list-item-time {
	align-self: flex-end;
	font-size: 12px;
	color: #5b7178;
}

.app-chat-list-item.app-chat-list-item--reverse {
	margin-left: auto;
}

.app-chat-list-item.app-chat-list-item--reverse .app-chat-list-item-img-box {
	margin-right: 0;
	margin-left: 35px;
	order: 3;
}
.app-chat-list-item.app-chat-list-item--reverse .app-chat-list-item-time {
	order: 1;
}
.app-chat-list-item.app-chat-list-item--reverse .app-chat-list-item-content {
	margin-right: 0;
	margin-left: 20px;

	order: 2;
}
.app-chat-list-item.app-chat-list-item--reverse .app-chat-list-item-message {
	background: #f5f5f5;
	border-radius: 15px 15px 0px 15px;
}

.app-chat-footer {
	display: flex;
	flex-direction: row;
	align-items: center;
	border-top: 0.5px solid #bcbdc4;
	padding: 7px 30px 15px 20px;
}

.app-chat-footer-input-box {
	flex: 1;
}

.app-chat-footer-input {
	width: 100%;
	font-size: 15px;
	border: none;
	padding: 3px 20px 3px 0;
}

.app-chat-footer-input:focus-visible {
	outline: none;
}

.app-chat-footer-input-file-box {
	margin-right: 10px;
}

.app-chat-footer-input-file-label {
	cursor: pointer;
}

.app-chat-send-btn {
	display: flex;
	justify-content: center;
	gap: 10px;
	align-items: center;
	box-shadow: 0px 4px 4px 0px #00000040;
}

@media (max-width: 1200px) {
}

@media (max-width: 768px) {

    .app-chat {
        flex-direction: column;
        height: auto;
        min-width: 100%;
    }

    .app-chat-info {
        flex-direction: row;
        max-width: 100%;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #bcbdc4;
        justify-content: center;
        gap: 20px;
        padding: 15px;
    }

    .app-chat-history {
        max-width: 100%;
        min-width: 100%;
        border-right: none;
        border-bottom: 1px solid #bcbdc4;
        height: 250px;
    }

    .app-chat-box {
        width: 100%;
        flex: 1;
    }


    .app-chat-list-item {
        width: 100%;
    }

    .app-chat-list-item-img {
        width: 45px;
        height: 45px;
    }

    .app-chat-footer {
        padding: 10px 15px;
    }
    .app-chat-box-inner {
        display: flex;
        flex-direction: column;
        height: calc(100vh - 260px); /* регулируется */
        overflow: hidden;
    }

    .app-chat-box-scroll {
        flex: 1;
        overflow-y: auto;
        padding-bottom: 20px;
    }

    .app-chat-list {
        padding: 20px 15px;
        display: flex;
        flex-direction: column;
        gap: 25px;
        overflow-y: auto;    /* ← включаем скролл */
        flex: 1;
        max-height: calc(100vh - 350px);  /* ← ограничение высоты */
    }

    .app-chat-list::-webkit-scrollbar {
        width: 4px;
    }

    .app-chat-list::-webkit-scrollbar-thumb {
        background: #b0b0b0;
        border-radius: 10px;
    }
}
