/* Smart Info Card Styles */

#smart-card-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(45, 60, 28, 0.4);
    z-index: 2999;
    opacity: 0;
    transition: opacity 0.3s ease;
}
#smart-card-overlay.visible {
    display: block;
    opacity: 1;
}

#smart-card {
    position: fixed;
    z-index: 3000;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(45, 60, 28, 0.18);
    width: 320px;
    max-width: calc(100vw - 32px);
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
    color: #2d3c1c;
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    transition: opacity 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none; /* Desktop default to avoid flickering */
}

#smart-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Card Inner Elements */
#smart-card .card-header {
    padding: 16px 20px;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.02em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#smart-card .card-body {
    padding: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #4a4d45;
}

#smart-card .card-body .price {
    font-size: 16px;
    font-weight: 700;
    color: #4c542c;
}

#smart-card .card-body .kad_num {
    font-size: 13px;
    word-break: break-all;
    color: #848274;
}

/* Status Gradients */
#smart-card.status-free .card-header { background: linear-gradient(135deg, #82ad51 0%, #6a9a3d 100%); }
#smart-card.status-sold .card-header { background: linear-gradient(135deg, #b84444 0%, #9a3838 100%); }
#smart-card.status-booked .card-header { background: linear-gradient(135deg, #e8c547 0%, #d4b03a 100%); color: #2d3c1c; }
#smart-card.status-second .card-header { background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%); }
#smart-card.status-objects .card-header { background: linear-gradient(135deg, #4c542c 0%, #2d3c1c 100%); }

/* Objects Image */
#smart-card .card-image {
    display: block;
}
#smart-card .card-image img {
    display: block;
    width: 100%;
    height: auto;
}

/* Close Button (Mobile Only) */
.smart-card-close {
    display: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    color: #fff;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: -4px -4px -4px 0;
}
#smart-card.status-booked .smart-card-close {
    color: #2d3c1c;
    background: rgba(45,60,28,0.1);
}

/* Mobile Bottom Sheet Styles */
#smart-card.is-mobile-sheet {
    top: auto !important;
    left: 50% !important;
    bottom: 16px !important;
    transform: translate(-50%, 100%) scale(1) !important;
    width: calc(100vw - 32px);
}
#smart-card.is-mobile-sheet.visible {
    transform: translate(-50%, 0) scale(1) !important;
}
#smart-card.is-mobile-sheet .smart-card-close {
    display: flex;
}
