/* Стили для модального окна отправки сообщений на странице объекта */

/* Анимации для модального окна */
#messageModal {
    animation-duration: 0.15s;
    animation-fill-mode: both;
}

#messageModal:not(.hidden) {
    animation-name: fadeIn;
}

#messageModal.closing {
    animation-name: fadeOut;
}

#messageModal>div>div {
    transform: scale(0.9);
    transition: transform 0.15s ease-out;
}

#messageModal:not(.hidden)>div>div {
    transform: scale(1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* Стили для кнопки написать сообщение */
.message-button {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.1), 0 2px 4px -1px rgba(16, 185, 129, 0.06);
    border: none;
    transition: all 0.2s ease-in-out;
}

.message-button:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.2), 0 4px 6px -2px rgba(16, 185, 129, 0.1);
    transform: translateY(-1px);
}

.message-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.1), 0 2px 4px -1px rgba(16, 185, 129, 0.06);
}

/* Пульсирующий эффект для уведомления о новом сообщении */
@keyframes pulse-green {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.pulse-message {
    animation: pulse-green 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Стили для статусных сообщений */
.message-status-success {
    background-color: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.message-status-error {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* Адаптивные стили для мобильных устройств */
@media (max-width: 640px) {
    #messageModal>div>div {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }

    .message-button {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }
}

/* Фокусные состояния для accessibility */
.message-button:focus {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

#messageText:focus {
    ring-color: #10b981;
    border-color: #10b981;
}

/* Счетчик символов */
.char-counter {
    transition: color 0.2s ease-in-out;
}

.char-counter.warning {
    color: #d97706;
    font-weight: 500;
}

.char-counter.danger {
    color: #dc2626;
    font-weight: 600;
}

/* Эффект загрузки */
.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Hover эффекты для интерактивных элементов */
.property-info-card {
    transition: all 0.2s ease-in-out;
}

.property-info-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Стили для карточки получателя */
.recipient-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease-in-out;
}

.recipient-card:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}