/* Стили для главной страницы Kvaker.net */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #1a73e8;
    --primary-dark: #0d47a1;
    --secondary: #ff6d00;
    --light: #f8f9fa;
    --dark: #202124;
    --gray: #5f6368;
    --light-gray: #dadce0;
    --success: #34a853;
}

body {
    background-color: #f5f5f5;
    color: var(--dark);
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
}

/* Боковая панель */
.sidebar {
    width: 250px;
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.logo {
    padding: 20px;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    color: var(--primary);
    border-bottom: 1px solid var(--light-gray);
}

.logo i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--gray);
    transition: all 0.2s;
}

.nav-item:hover {
    background: #f1f3f4;
    color: var(--primary);
}

.nav-item.active {
    background: #e8f0fe;
    color: var(--primary);
    border-right: 3px solid var(--primary);
}

.nav-icon {
    font-size: 1.2rem;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

.nav-text {
    font-size: 0.95rem;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--light-gray);
    font-size: 0.8rem;
    color: var(--gray);
}

/* Основной контент */
.main-content {
    flex: 1;
    margin-left: 250px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Шапка сайта */
.header {
    background: white;
    color: var(--dark);
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 99;
}

/* Контейнер поиска + выбора города в шапке */
.search-container {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 700px;
    margin: 0 20px;
    gap: 15px;
}

.search-bar {
    flex: 1;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--light-gray);
    border-radius: 24px;
    font-size: 0.9rem;
    outline: none;
}

.search-bar input:focus {
    border-color: var(--primary);
}

.city-selector {
    position: relative;
}

.city-display {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.city-display:hover {
    background: #e9ecef;
}

.city-display i {
    margin-left: 8px;
    font-size: 0.8rem;
    color: var(--gray);
}

.city-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 15px;
    margin-top: 5px;
    z-index: 1000;
    display: none;
}

.city-dropdown.active {
    display: block;
}

.city-search {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    outline: none;
}

.city-search:focus {
    border-color: var(--primary);
}

.city-list {
    max-height: 300px;
    overflow-y: auto;
}

.city-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
}

.city-item:hover {
    background: #f1f3f4;
}

.city-item.active {
    background: #e8f0fe;
    color: var(--primary);
    font-weight: 500;
}

.city-name {
    flex: 1;
}

.city-distance {
    font-size: 0.85rem;
    color: var(--gray);
    margin-left: 10px;
}

.header-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-action {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--gray);
    cursor: pointer;
    position: relative;
    text-decoration: none;
    transition: color 0.2s, transform 0.15s, background-color 0.15s;
    padding: 6px;
    border-radius: 50%;
}

.header-action:hover {
    color: var(--primary);
    background-color: rgba(26, 115, 232, 0.08);
    transform: translateY(-1px);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-profile {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.user-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
}

.user-name-small {
    font-weight: 500;
    font-size: 0.9rem;
}

/* Контейнер контента */
.container {
    flex: 1;
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Двухколоночный макет */
.content-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.main-column {
    display: flex;
    flex-direction: column;
}

.sidebar-column {
    display: flex;
    flex-direction: column;
}

/* Переключатель вида */
.view-toggle {
    display: flex;
    background: white;
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.toggle-option {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
}

.toggle-option.active {
    background: var(--primary);
    color: white;
}

/* Фильтры */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px 0;
    margin-bottom: 20px;
}

.filter {
    background: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.filter.active {
    background: var(--primary);
    color: white;
}

/* Карточки контента */
.content-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.card-header {
    padding: 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--light-gray);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    margin-bottom: 3px;
}

.post-meta {
    font-size: 0.8rem;
    color: var(--gray);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 15px;
}

.card-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--dark);
}

.card-description {
    color: var(--gray);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.card-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.card-actions {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid var(--light-gray);
    padding-top: 12px;
}

.card-action {
    display: flex;
    align-items: center;
    color: var(--gray);
    font-size: 0.9rem;
    cursor: pointer;
    background: none;
    border: none;
}

.card-action i {
    margin-right: 5px;
    font-size: 1.1rem;
}

.card-action.liked {
    color: #e53935;
}

/* Бейджи категорий */
.category-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 5px;
    margin-bottom: 5px;
}

.category-people {
    background: #e8f0fe;
    color: var(--primary);
}

.category-communities {
    background: #e6f4ea;
    color: var(--success);
}

.category-housing {
    background: #fce8e6;
    color: #d93025;
}

.category-food {
    background: #fff8e1;
    color: #f9ab00;
}

.category-events {
    background: #f3e5f5;
    color: #ab47bc;
}

.category-companions {
    background: #e0f2f1;
    color: #00796b;
}

.category-dating {
    background: #fce4ec;
    color: #ad1457;
}

.category-audio {
    background: #e8eaf6;
    color: #3f51b5;
}

.category-market {
    background: #fbe9e7;
    color: #ff5722;
}

/* Быстрые действия */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.quick-action {
    background: white;
    border-radius: 10px;
    padding: 15px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--dark);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.quick-action:hover {
    transform: translateY(-3px);
}

.quick-action i {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--primary);
}

.quick-action span {
    font-size: 0.8rem;
    text-align: center;
}

/* Рекламные модули */
.ad-container {
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ad-label {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f3f4;
    color: #5f6368;
    padding: 5px 10px;
    font-size: 0.75rem;
    font-weight: 500;
}

.ad-label i {
    margin-right: 5px;
    font-size: 0.7rem;
}

.ad-banner {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.ad-banner h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.ad-banner p {
    font-size: 0.9rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.ad-btn {
    display: inline-block;
    background: white;
    color: #6a11cb;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 5px;
}

.ad-card {
    background: white;
    padding: 15px;
    display: flex;
    align-items: center;
}

.ad-card-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 15px;
}

.ad-card-content {
    flex: 1;
}

.ad-card-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.ad-card-description {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 10px;
}

.ad-card-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
}

.ad-native {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 4px solid var(--secondary);
}

.ad-native-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.ad-native-badge {
    background: var(--secondary);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-right: 8px;
}

.ad-native-title {
    font-weight: 600;
    font-size: 1rem;
}

.ad-native-description {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 10px;
}

.ad-native-link {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.ad-native-link i {
    margin-left: 5px;
    font-size: 0.8rem;
}

/* Боковая панель контента */
.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.widget-title {
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--light-gray);
    color: var(--dark);
}

.trending-list {
    list-style: none;
}

.trending-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.trending-item:last-child {
    border-bottom: none;
}

.trending-number {
    font-weight: bold;
    color: var(--primary);
    margin-right: 10px;
    font-size: 1.1rem;
}

.trending-content {
    flex: 1;
}

.trending-title {
    font-weight: 500;
    margin-bottom: 3px;
    font-size: 0.9rem;
}

.trending-meta {
    font-size: 0.75rem;
    color: var(--gray);
}

.online-users {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.online-user {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60px;
}

.online-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 5px;
    border: 2px solid var(--success);
}

.online-name {
    font-size: 0.7rem;
    text-align: center;
    color: var(--gray);
}

/* Статус онлайн/оффлайн */
.online-avatar-offline {
    border-color: var(--light-gray);
    opacity: 0.7;
}

.online-status {
    font-size: 0.65rem;
    text-align: center;
    margin-top: 2px;
}

.online-status.online {
    color: var(--success);
}

.online-status.offline {
    color: var(--gray);
}

/* Адаптивность */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar-column {
        display: none;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .quick-actions {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Стили для модального окна */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: var(--dark);
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}

.form-label.required::after {
    content: " *";
    color: #d93025;
}

.form-control, .form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-col {
    flex: 1;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--light-gray);
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: white;
    color: var(--gray);
    border: 1px solid var(--light-gray);
}

.btn-secondary:hover {
    background: #f5f5f5;
}

.category-form {
    display: none;
}

.category-form.active {
    display: block;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.checkbox-item input[type="checkbox"] {
    width: auto;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 5px;
}

.contact-block {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.contact-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark);
}

.form-radio-group {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.radio-item input[type="radio"] {
    width: auto;
}

.privacy-options {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.privacy-option {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.privacy-option:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.privacy-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.privacy-description {
    font-size: 0.85rem;
    color: var(--gray);
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* ============================================
   СТИЛИ ДЛЯ МОДАЛЬНОГО ОКНА ЧАТА
   ============================================ */

/* Модальное окно чата */
.chat-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
}

.chat-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1000px;
    height: 80%;
    background: white;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.chat-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    flex-shrink: 0;
}

.chat-modal-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.chat-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.chat-close:hover {
    color: var(--primary);
}

.chat-modal-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* Список чатов в модальном окне */
.chat-modal .chat-list {
    width: 350px;
    border-right: 1px solid var(--light-gray);
    overflow-y: auto;
    background: white;
    display: flex;
    flex-direction: column;
}

.chat-modal .chat-list-header {
    padding: 15px;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.chat-modal .chat-list-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.chat-modal .chat-search {
    padding: 10px 15px;
    border-bottom: 1px solid var(--light-gray);
    flex-shrink: 0;
}

.chat-modal .search-input {
    width: 100%;
    padding: 10px 15px;
    border-radius: 20px;
    border: 1px solid var(--light-gray);
    background: #f5f5f5;
    font-size: 0.9rem;
    outline: none;
}

.chat-modal .search-input:focus {
    border-color: var(--primary);
    background: white;
}

.chat-modal .chat-items {
    flex: 1;
    overflow-y: auto;
}

.chat-modal .empty-chats {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.chat-modal .chat-item {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid var(--light-gray);
    cursor: pointer;
    transition: background 0.2s;
}

.chat-modal .chat-item:hover,
.chat-modal .chat-item.active {
    background: #f5f5f5;
}

.chat-modal .chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
    flex-shrink: 0;
}

.chat-modal .chat-info {
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.chat-modal .chat-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.chat-modal .chat-name {
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-modal .chat-time {
    font-size: 0.8rem;
    color: var(--gray);
    white-space: nowrap;
    margin-left: 10px;
}

.chat-modal .chat-preview {
    display: flex;
    align-items: center;
}

.chat-modal .chat-message {
    font-size: 0.9rem;
    color: var(--gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.chat-modal .chat-badge {
    background: var(--primary);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
    flex-shrink: 0;
}

/* Окно чата в модальном окне */
.chat-modal .chat-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.chat-modal .chat-window:not(.active) {
    display: none;
}

.chat-modal .chat-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.chat-modal .chat-header {
    padding: 15px;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    align-items: center;
    background: white;
    flex-shrink: 0;
}

.chat-modal .chat-user-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.chat-modal .chat-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    flex-shrink: 0;
}

.chat-modal .chat-user-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.chat-modal .chat-user-status {
    font-size: 0.8rem;
    color: var(--gray);
}

.chat-modal .chat-actions {
    display: flex;
    gap: 15px;
}

.chat-modal .chat-action {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--gray);
    cursor: pointer;
    transition: color 0.2s;
}

.chat-modal .chat-action:hover {
    color: var(--primary);
}

.chat-modal .messages-container {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
}

.chat-modal .message {
    max-width: 70%;
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
}

.chat-modal .message-incoming {
    background: white;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.chat-modal .message-outgoing {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.chat-modal .message-time {
    font-size: 0.7rem;
    text-align: right;
    margin-top: 5px;
    opacity: 0.7;
}

.chat-modal .message-status {
    font-size: 0.7rem;
    margin-left: 5px;
}

.chat-modal .message-actions {
    position: absolute;
    top: 5px;
    right: 10px;
    display: none;
    background: rgba(0,0,0,0.1);
    border-radius: 50%;
    width: 25px;
    height: 25px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.chat-modal .message:hover .message-actions {
    display: flex;
}

.chat-modal .message-actions:hover {
    background: rgba(0,0,0,0.2);
}

.chat-modal .message-input-container {
    padding: 15px;
    border-top: 1px solid var(--light-gray);
    background: white;
    display: flex;
    align-items: center;
    position: relative;
    flex-shrink: 0;
}

.chat-modal .message-input {
    flex: 1;
    padding: 12px 15px;
    border-radius: 24px;
    border: 1px solid var(--light-gray);
    font-size: 1rem;
    outline: none;
}

.chat-modal .message-input:focus {
    border-color: var(--primary);
}

.chat-modal .send-button {
    background: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.chat-modal .send-button:hover {
    background: var(--primary-dark);
}

.chat-modal .emoji-button {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--gray);
    margin-right: 10px;
    cursor: pointer;
    transition: color 0.2s;
}

.chat-modal .emoji-button:hover {
    color: var(--primary);
}

.chat-modal .back-button {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    margin-right: 10px;
    color: var(--gray);
    cursor: pointer;
    transition: color 0.2s;
}

.chat-modal .back-button:hover {
    color: var(--primary);
}

/* Адаптивность для модального окна чата */
@media (max-width: 1024px) {
    .chat-modal-content {
        width: 95%;
        height: 85%;
    }
    
    .chat-modal .chat-list {
        width: 300px;
    }
}

@media (max-width: 768px) {
    .chat-modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    
    .chat-modal .chat-list {
        width: 100%;
    }
    
    .chat-modal .chat-window {
        display: none;
    }
    
    .chat-modal .chat-window.active {
        display: flex;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 10;
    }
    
    .chat-modal .back-button {
        display: block;
    }
}

