/* LCDJ Favorites Styles - Updated 2026-08-19 */

/* Favorite Button */
.recent-properties-grid .lcdj-favorite-btn svg {
    width: 85%;
}

#lcdj-favorites-list .lcdj-favorite-btn svg {
    width: 100%;
}

#lcdj-favorites-list .favorite-card-image .lcdj-favorite-btn {
    width: 35px;
    height: 35px;
}

.recent-properties-grid .favorite-card-image .lcdj-favorite-btn {
    width: 35px;
    height: 35px;
}


.lcdj-favorite-btn {
    position: relative;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: #959387;
    padding: 0;
    line-height: 1;
}

.lcdj-favorite-btn svg {
    width: 50%;
}

.lcdj-favorite-btn .heart-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.lcdj-favorite-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.lcdj-favorite-btn.favorited {
    background: #959387 !important;
    color: #ffffff;
    animation: heartbeat 0.3s ease;
}

.lcdj-favorite-btn.favorited:hover {
    background: #7f8078;
}

.lcdj-favorite-btn.favorited:active {
    background: #959387 !important;
    transform: scale(0.95);
}

.lcdj-favorite-btn.favorited svg {
    fill: currentColor;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.lcdj-favorite-btn:active {
    transform: scale(0.95);
}

.logo_modal {
    width: 130px;
}

/* Favorite Button Overlay Container */
.lcdj-favorite-overlay {
    position: absolute;
    top: 1px;
    right: 1px;
    z-index: 10;
}

/* Favorite Button in Cards/Properties */
.property-card .lcdj-favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

/* Favorite Card Badge */
.lcdj-favorite-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 11;
    background: rgba(255, 255, 255, 0.85);
    color: #2c3e50;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Favorites Grid */
.lcdj-favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

/* Favorite Card */
.lcdj-favorite-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.lcdj-favorite-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.favorite-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    background: #f5f5f5;
    overflow: hidden;
}

.favorite-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.lcdj-favorite-card:hover .favorite-card-image img {
    transform: scale(1.05);
}

.favorite-card-location-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.3));
    padding: 12px 16px;
    z-index: 5;
}

.favorite-card-location-overlay a {
    color: #fff;
    text-decoration: none;
    font-size: 11px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

.favorite-card-location-overlay a:hover {
    color: #e74c3c;
}

.favorite-card-image .lcdj-favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
}

.favorite-card-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.favorite-card-price-section {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.favorite-price-label {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0;
}

.favorite-card-specs {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #555;
    white-space: nowrap;
    height: 20px;
}

.spec-emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    opacity: 0.7;
    flex-shrink: 0;
    filter: grayscale(100%);
    line-height: 1;
}

.lcdj-favorite-ubicacion {
    margin: 0 0 6px 0;
    font-size: 13px;
    color: #999;
    line-height: 1.4;
}

.lcdj-favorite-detalles {
    margin: 0 0 12px 0;
    font-size: 12px;
    color: #666;
    line-height: 1.5;
}

.lcdj-favorite-footer {
    display: none;
}

.lcdj-favorite-precio {
    margin: 0;
    font-size: 16px;
    color: #333;
    flex-shrink: 0;
}

.lcdj-favorite-precio strong {
    font-weight: 400;
    font-size: 18px;
}

.favorite-card-content .lcdj-btn {
    width: auto;
    margin: 0;
    padding: 8px 20px;
    font-size: 12px;
    white-space: nowrap;
}

/* Empty State */
.lcdj-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 20px 0;
}

.lcdj-empty-state p {
    font-size: 16px;
    color: #666;
    margin: 0 0 20px 0;
}

.lcdj-empty-state .lcdj-btn {
    display: inline-block;
    width: auto;
    margin-top: 10px;
}

/* Notification */
.lcdj-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    z-index: 9999;
    animation: slideInUp 0.3s ease;
    border-left: 4px solid;
}

@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.lcdj-notification-success {
    border-left-color: #27ae60;
    color: #27ae60;
    background: #d5f4e6;
}

.lcdj-notification-error {
    border-left-color: #e74c3c;
    color: #e74c3c;
    background: #fadbd8;
}

.lcdj-notification-info {
    border-left-color: #3498db;
    color: #3498db;
    background: #d6eaf8;
}

/* Favorites Count Badge */
.lcdj-favorites-count {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
}

/* Favorite button on property detail pages */
.cj-prop-details__buttons {
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

.cj-prop-details__buttons .lcdj-favorite-btn {
    width: 37px;
    height: 37px;
    font-size: 22px;
}

/* Small Button Variant */
.lcdj-btn-small {
    padding: 8px 16px;
    font-size: 12px;
    width: auto;
}

/* Modal para agregar favoritos sin sesión */
.lcdj-favorites-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lcdj-favorites-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lcdj-favorites-modal {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.4s ease;
    position: relative;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.lcdj-favorites-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.lcdj-favorites-modal-close:hover {
    color: #333;
}

.lcdj-favorites-modal-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.lcdj-favorites-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
    text-align: center;
}

.lcdj-favorites-modal-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 24px 0;
    text-align: center;
}

.lcdj-favorites-modal-info {
    background: #f5f5f5;
    border-left: 4px solid #959387;
    padding: 12px 16px;
    border-radius: 4px;
    margin: 0 0 24px 0;
    font-size: 13px;
    color: #666;
}

.lcdj-favorites-modal-info strong {
    color: #333;
    display: block;
    margin-bottom: 4px;
}

.lcdj-favorites-modal-buttons {
    display: flex;
    gap: 12px;
    flex-direction: column;
}

.lcdj-favorites-modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.lcdj-favorites-modal-btn-primary {
    background: #959387;
    color: #fff;
}

.lcdj-favorites-modal-btn-primary:hover {
    background: #7f8078;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(149, 147, 135, 0.3);
}

.lcdj-favorites-modal-btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.lcdj-favorites-modal-btn-secondary:hover {
    background: #e8e8e8;
    border-color: #ccc;
}

/* Responsive */
@media (max-width: 768px) {
    .lcdj-favorites-grid {
        grid-template-columns: 1fr;
    }

    .lcdj-favorite-btn {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }

    .lcdj-notification {
        bottom: 10px;
        right: 10px;
        left: 10px;
        width: calc(100% - 20px);
    }

    .favorite-card-image {
        height: 150px;
    }

    .favorite-card-price-section {
        flex-direction: row;
        align-items: center !important;
        gap: 12px !important;
    }

    .favorite-price-label {
        display: none;
    }

    .lcdj-favorite-precio {
        font-size: 14px;
    }

    .lcdj-favorite-precio strong {
        font-size: 14px;
    }

    .favorite-card-specs {
        gap: 12px;
        flex-wrap: nowrap;
    }

    .spec-item {
        font-size: 12px;
    }

    .lcdj-favorites-modal {
        padding: 30px 24px;
        max-width: 95%;
    }

    .lcdj-favorites-modal-buttons {
        flex-direction: column;
    }

    .lcdj-favorites-modal-btn {
        width: 100%;
    }
}
