/**
 * Стили для избранного и сравнения
 */

/* ===== Кнопка добавления ===== */
.favorite-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 6px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #55697a;
}

.favorite-toggle:hover {
    border-color: #55697a;
    background: #f5f7f9;
}

.favorite-toggle.active {
    background: #f3f1ef;
    color: #55697a;
    border: 1px solid #55697a8f;
}

.favorite-icon {
    font-size: 18px;
    line-height: 1;
}

/* ===== Уведомления ===== */
.favorite-notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
}

.favorite-notification {
    padding: 15px 25px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    margin-bottom: 10px;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    border-left: 4px solid;
}

.favorite-notification.show {
    transform: translateX(0);
}

.favorite-notification.success {
    border-left-color: #4caf50;
}

.favorite-notification.info {
    border-left-color: #55697a;
}

.favorite-notification.error {
    border-left-color: #f44336;
}

/* ===== Страница избранного ===== */
.favorites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.favorites-title {
    font-size: 32px;
    font-weight: 700;
    color: #55697a;
    margin: 0;
}

.favorites-actions {
    display: flex;
    gap: 15px;
}

.compare-btn {
    padding: 12px 25px;
    background: white;
    border: 1px solid #55697a;
    border-radius: 30px;
    color: #55697a;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.compare-btn:hover {
    background: #55697a;
    color: white;
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.favorite-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #f0f0f0;
}

.favorite-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(85, 105, 122, 0.15);
}

.favorite-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: #999;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.favorite-remove:hover {
    background: #f44336;
    color: white;
}

.favorite-thumb {
    width: 246px;
    height: 204px;
    object-fit: contain;
    padding-left: 22px;
}
span.favorite-icon {
    color: #55697a !important;
}

.favorite-content {
    padding: 20px;
}

.favorite-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
}

.favorite-title a {
    color: inherit;
    text-decoration: none;
}

.favorite-title a:hover {
    color: #55697a;
}

.favorite-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.favorite-price {
    font-size: 22px;
    font-weight: 700;
    color: #55697a;
    margin-bottom: 15px;
}



.favorites-count-header {
    margin-left: -4px;
    color: #ffffff;
    font-weight: 600;
    background: #ffbc48;
    border-radius: 22px;
    padding: 4px 5px;
    width: 29px;
    display: flex;
    justify-content: center;
    margin-left: 2px;
}


.favorite-request-btn {
    width: 100%;
    padding: 8px;
    background: #55697a;
    color: white;
    border: none;
    border-radius: 2px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}
.favorite-request-btn:hover {
    background: #3e4f5d;
}

/* Пустой список */
.favorites-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 12px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.favorites-empty h3 {
    font-size: 24px;
    color: #55697a;
    margin-bottom: 10px;
}

.favorites-empty p {
    color: #999;
    margin-bottom: 20px;
}

.empty-link {
    display: inline-block;
    padding: 12px 30px;
    background: #55697a;
    color: white;
    text-decoration: none;
    border-radius: 30px;
    transition: background 0.3s ease;
}

.empty-link:hover {
    background: #3e4f5d;
}

/* ===== Модальное окно заявки ===== */
.request-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.request-modal {
    background: white;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    position: relative;
}

.request-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.request-modal-close:hover {
    color: #333;
}

.request-modal h3 {
    font-size: 24px;
    color: #55697a;
    margin: 0 0 10px 0;
}

.flat-info {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.request-input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.request-input:focus {
    outline: none;
    border-color: #55697a;
}

.request-textarea {
    min-height: 100px;
    resize: vertical;
}

.request-submit {
    width: 100%;
    padding: 14px;
    background: #55697a;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.request-submit:hover {
    background: #3e4f5d;
}

/* ===== Таблица сравнения ===== */
.compare-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
}

.compare-modal {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 30px;
}

.compare-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
    z-index: 2;
}

.compare-modal-close:hover {
    color: #333;
}

.compare-modal h3 {
    font-size: 28px;
    color: #55697a;
    margin: 0 0 20px 0;
    padding-right: 30px;
}

.compare-table-container {
    overflow-x: auto;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.compare-table th {
    background: #f5f7f9;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #55697a;
    border-bottom: 2px solid #ddd;
}

.compare-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.compare-table tr:hover td {
    background: #f9f9f9;
}

.compare-table td:first-child {
    font-weight: 600;
    color: #55697a;
    background: #fafafa;
}

.compare-thumb {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .favorites-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .favorites-actions {
        width: 100%;
    }
    
    .compare-btn {
        width: 100%;
        justify-content: center;
    }
    
    .request-modal {
        padding: 30px 20px;
    }
}