/* Emlak Favoriler CSS */

.emlak-favorite-button-wrapper {
    display: inline-block;
}

.emlak-favorite-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.emlak-favorite-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.emlak-favorite-btn.active {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

.emlak-favorite-btn.active:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.emlak-favorite-btn i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.emlak-favorite-btn:hover i {
    transform: scale(1.2);
}

.emlak-favorite-btn.active i {
    animation: heartBeat 0.6s ease;
}

@keyframes heartBeat {

    0%,
    100% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.3);
    }

    50% {
        transform: scale(1.1);
    }

    75% {
        transform: scale(1.2);
    }
}

/* Favori eklendi animasyonu */
.emlak-favorite-btn.favorite-added {
    animation: favoriteAdded 0.6s ease;
}

@keyframes favoriteAdded {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

/* Favoriden çıkarıldı animasyonu */
.emlak-favorite-btn.favorite-removed {
    animation: favoriteRemoved 0.4s ease;
}

@keyframes favoriteRemoved {
    0% {
        background: #ef4444;
        border-color: #ef4444;
        color: #fff;
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(0.9);
        opacity: 0.7;
    }

    100% {
        background: rgba(255, 255, 255, 0.95);
        border-color: rgba(239, 68, 68, 0.2);
        color: #6b7280;
        transform: scale(1);
        opacity: 1;
    }
}

/* Icon-only butonlar için favoriden çıkarıldı animasyonu */
.emlak-favorite-btn.icon-only.favorite-removed {
    animation: favoriteRemovedIcon 0.4s ease;
}

@keyframes favoriteRemovedIcon {
    0% {
        background: #ef4444;
        border-color: #ef4444;
        color: #fff;
        transform: scale(1);
        opacity: 1;
    }

    30% {
        transform: scale(0.85);
        opacity: 0.6;
    }

    60% {
        transform: scale(0.9);
        opacity: 0.8;
    }

    100% {
        background: rgba(255, 255, 255, 0.95);
        border-color: rgba(239, 68, 68, 0.2);
        color: #6b7280;
        transform: scale(1);
        opacity: 1;
    }
}

.emlak-favorite-btn .favorite-text {
    white-space: nowrap;
}

.emlak-favorite-btn .favorite-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 4px;
}

.emlak-favorite-btn.active .favorite-count {
    background: rgba(255, 255, 255, 0.2);
}

/* Icon-only buton için özel stiller */
.emlak-favorite-btn.icon-only .favorite-text,
.emlak-favorite-btn.icon-only .favorite-count {
    display: none;
}

.emlak-favorite-btn.loading {
    opacity: 1;
    cursor: wait;
    pointer-events: none;
}

.emlak-favorite-btn.loading i {
    animation: fa-spin 1s infinite linear;
}

/* İlan kartlarındaki favori butonları için loading durumunda arka plan rengini koru */
.listing-card .favorite-btn.loading,
.listing-card .emlak-favorite-btn.loading {
    opacity: 1;
    background: rgba(255, 255, 255, 0.9) !important;
}

.listing-card .favorite-btn.loading.active,
.listing-card .emlak-favorite-btn.loading.active {
    background: rgba(255, 63, 85, 0.9) !important;
}

/* Favorilenme sayısı widget */
.emlak-favorite-count-widget {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
}

.emlak-favorite-count-widget i {
    color: #ef4444;
    font-size: 18px;
}

.emlak-favorite-count-widget .count {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.emlak-favorite-count-widget .label {
    font-size: 14px;
    color: #6b7280;
}

/* İlan detay sayfası için özel stil - Görsel üzerinde favori butonu */
.main-image-container {
    position: relative;
}

.favorite-button-overlay {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
}

.favorite-button-overlay .emlak-favorite-btn.icon-only {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(239, 68, 68, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.favorite-button-overlay .emlak-favorite-btn.icon-only i {
    font-size: 20px;
    margin: 0;
}

.favorite-button-overlay .emlak-favorite-btn.icon-only.active {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

.favorite-button-overlay .emlak-favorite-btn.icon-only:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.3);
}

/* Meta bilgiler ve favorilerden çıkar butonu - Sadece Favorilerim sayfası için */
.emlak-favorites-list .listing-card .listing-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
}

.emlak-favorites-list .listing-card .listing-header-row {
    flex-shrink: 0;
    margin-bottom: 0;
}

.emlak-favorites-list .listing-card .listing-meta {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: -5px;
    margin-bottom: 0;
    font-size: 14px;
    color: var(--text-secondary);
    position: relative;
    flex-shrink: 0;
}

.emlak-favorites-list .listing-card .listing-meta .listing-meta-item {
    flex-shrink: 0;
}

.emlak-favorites-list .listing-card .listing-footer {
    flex-shrink: 0;
    margin-top: 0;
}

.emlak-favorites-list .listing-card .favorite-actions-meta {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    flex-shrink: 0;
    align-items: center;
    margin-left: auto;
}

.listing-card .emlak-remove-favorite {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
    font-size: 14px;
    text-decoration: none;
    flex-shrink: 0;
    padding: 0;
}

.listing-card .emlak-remove-favorite:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(255, 63, 85, 0.05);
}

.listing-card .emlak-remove-favorite.loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.listing-card .emlak-remove-favorite.loading i {
    animation: fa-spin 1s infinite linear;
}

/* Favoriler listesi - İlanlarım sayfası ile birebir aynı */
.emlak-favorites-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

/* İlanlarım sayfasındaki listing-card stillerini kullanıyoruz, özel stil gerekmiyor */

/* Badge'ler - Sol üstte, tema rengi arka plan */
.listing-card .favorite-listing-badge {
    display: block;
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(8px);
    z-index: 5;
    white-space: nowrap;
    line-height: 1.2;
    text-align: center;
    width: auto;
    max-width: none;
}

.listing-card .favorite-listing-badge.favorite-badge-primary {
    background: var(--primary, #ff3f55);
    color: #fff;
}

.listing-card .favorite-listing-badge.favorite-badge-secondary {
    background: var(--primary-light, #ff5f73);
    color: #fff;
}

.listing-card .listing-status-inline.favorite-badge-primary {
    background: rgba(239, 68, 68, 0.1);
    color: var(--primary, #ef4444);
}

.listing-card .listing-status-inline.favorite-badge-secondary {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

/* İlanlarım sayfasındaki listing-card stillerini kullanıyoruz, özel stil gerekmiyor */

/* Mobil Responsive Tasarım */
@media (max-width: 768px) {
    .emlak-favorites-list {
        gap: 12px;
        margin-top: 16px;
    }

    /* Sadece favoriler sayfasındaki listing-card'ları etkile */
    .emlak-favorites-list .listing-card {
        padding: 12px;
        gap: 12px;
        flex-direction: row;
        align-items: flex-start;
    }

    .emlak-favorites-list .listing-card .listing-image-wrapper {
        width: 100px;
        min-width: 100px;
        flex-shrink: 0;
        position: relative;
        overflow: hidden;
    }

    .emlak-favorites-list .listing-card .listing-image {
        width: 100px !important;
        height: 80px !important;
        min-width: 100px;
        min-height: 80px;
        border-radius: 8px;
    }

    .emlak-favorites-list .listing-card .listing-content {
        flex: 1;
        min-width: 0;
        height: auto;
        transform: none;
    }

    .emlak-favorites-list .listing-card .listing-title {
        font-size: 15px;
        line-height: 1.3;
        margin-bottom: 6px;
    }

    .emlak-favorites-list .listing-card .listing-meta {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 8px;
        position: relative;
    }

    .emlak-favorites-list .listing-card .listing-meta-item {
        font-size: 12px;
    }

    .emlak-favorites-list .listing-card .listing-meta-item i {
        font-size: 11px;
    }

    /* Mobilde görüntülenme sayısını gizle */
    .emlak-favorites-list .listing-card .listing-meta-item.meta-views {
        display: none;
    }

    /* Mobilde favori sayısını gizle */
    .emlak-favorites-list .listing-card .listing-meta-item.meta-favorites {
        display: none;
    }

    .emlak-favorites-list .listing-card .favorite-actions-meta {
        position: static;
        margin-left: auto;
        flex-shrink: 0;
    }

    .emlak-favorites-list .listing-card .emlak-remove-favorite {
        width: 32px;
        height: 32px;
        font-size: 13px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    .emlak-favorites-list .listing-card .listing-footer {
        margin-top: 0;
        padding-top: 8px;
        border-top: 1px solid var(--border-light);
    }

    .emlak-favorites-list .listing-card .listing-price {
        font-size: 18px;
    }

    .emlak-favorites-list .listing-card .favorite-listing-badge {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: absolute !important;
        top: 12px !important;
        left: 12px !important;
        z-index: 10 !important;
        padding: 6px 12px !important;
        border-radius: 8px !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
        width: auto;
        max-width: none;
    }

    .emlak-favorites-list .listing-card .favorite-listing-badge.favorite-badge-primary {
        background: rgba(255, 63, 85, 0.95) !important;
        color: white !important;
    }

    .emlak-favorites-list .listing-card .favorite-listing-badge.favorite-badge-secondary {
        background: rgba(255, 95, 115, 0.95) !important;
        color: white !important;
    }
}

@media (max-width: 480px) {
    .emlak-favorites-list {
        gap: 10px;
        margin-top: 12px;
    }

    /* Sadece favoriler sayfasındaki listing-card'ları etkile */
    .emlak-favorites-list .listing-card {
        padding: 10px;
        gap: 10px;
    }

    .emlak-favorites-list .listing-card .listing-image-wrapper {
        width: 80px;
        min-width: 80px;
        position: relative;
        overflow: hidden;
    }

    .emlak-favorites-list .listing-card .listing-image {
        width: 80px !important;
        height: 70px !important;
        min-width: 80px;
        min-height: 70px;
    }

    .emlak-favorites-list .listing-card .listing-title {
        font-size: 14px;
        margin-bottom: 4px;
    }

    .emlak-favorites-list .listing-card .listing-meta {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 6px;
        position: relative;
    }

    .emlak-favorites-list .listing-card .listing-meta-item {
        font-size: 11px;
    }

    /* Mobilde görüntülenme sayısını gizle */
    .emlak-favorites-list .listing-card .listing-meta-item.meta-views {
        display: none;
    }

    /* Mobilde favori sayısını da gizle, sadece konum göster */
    .emlak-favorites-list .listing-card .listing-meta-item.meta-favorites {
        display: none;
    }

    .emlak-favorites-list .listing-card .favorite-actions-meta {
        position: static;
        margin-left: auto;
        flex-shrink: 0;
    }

    .emlak-favorites-list .listing-card .favorite-listing-badge {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: absolute !important;
        top: 12px !important;
        left: 12px !important;
        z-index: 10 !important;
        padding: 6px 12px !important;
        border-radius: 8px !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
        width: auto;
        max-width: none;
    }

    .emlak-favorites-list .listing-card .favorite-listing-badge.favorite-badge-primary {
        background: rgba(255, 63, 85, 0.95) !important;
        color: white !important;
    }

    .emlak-favorites-list .listing-card .favorite-listing-badge.favorite-badge-secondary {
        background: rgba(255, 95, 115, 0.95) !important;
        color: white !important;
    }

    .emlak-favorites-list .listing-card .emlak-remove-favorite {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .emlak-favorites-list .listing-card .listing-price {
        font-size: 16px;
    }

    .emlak-favorites-list .listing-card .favorite-listing-badge {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: absolute !important;
        top: 12px !important;
        left: 12px !important;
        z-index: 10 !important;
        padding: 6px 12px !important;
        border-radius: 8px !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
        width: auto;
        max-width: none;
    }

    .listing-card .favorite-listing-badge.favorite-badge-primary {
        background: rgba(255, 63, 85, 0.95) !important;
        color: white !important;
    }

    .listing-card .favorite-listing-badge.favorite-badge-secondary {
        background: rgba(255, 95, 115, 0.95) !important;
        color: white !important;
    }
}

/* Boş favoriler mesajı */
.emlak-favorites-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.emlak-favorites-empty i {
    font-size: 64px;
    color: #d1d5db;
    margin-bottom: 16px;
}

.emlak-favorites-empty h3 {
    font-size: 24px;
    margin-bottom: 8px;
    color: #111827;
}

.emlak-favorites-empty p {
    font-size: 16px;
    margin-bottom: 24px;
}

/* Responsive - Eski stiller temizlendi, yeni mobil stiller yukarıda */