/* ============================================
   Terrain Card Component Styles
   ============================================ */

/* Base card */
.terrain-card {
    position: relative;
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.terrain-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

/* Stretched link for full card clickability */
.terrain-card .stretched-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    cursor: pointer;
}

/* Card body */
.terrain-card .card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Title container */
.terrain-card .card-body > div:first-child {
    height: 60px;
}

/* Title - 2 lines max */
.terrain-card .card-title {
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    max-height: calc(1.4em * 2);
}

/* Description - 3 lines default */
.terrain-card .card-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0;
}

.terrain-card .card-text.description-lines-2 { -webkit-line-clamp: 2; line-clamp: 2; }
.terrain-card .card-text.description-lines-4 { -webkit-line-clamp: 4; line-clamp: 4; }
.terrain-card .card-text.description-lines-5 { -webkit-line-clamp: 5; line-clamp: 5; }
.terrain-card .card-text.description-lines-6 { -webkit-line-clamp: 6; line-clamp: 6; }

/* Bottom info (area and date) */
.terrain-card .card-body > div:last-child {
    font-size: 1.1rem;
    margin-top: auto;
}

/* Price badge */
.price-badge {
    background: #27ae60;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1rem;
    white-space: nowrap;
}

.price-badge.first-auction  { background: #27ae60; }
.price-badge.second-auction { background: #f39c12; }
.price-badge.third-auction  { background: #e74c3c; }

.discount-indicator {
    display: block;
    font-size: 0.75rem;
    margin-top: 2px;
    opacity: 0.9;
}

/* Location badge */
.location-badge {
    background: #3498db;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Date link */
.date-link {
    position: relative;
    z-index: 2;
    color: #2980b9;
    transition: all 0.3s ease;
    text-decoration: none;
}

.date-link:hover {
    color: #3498db;
    text-decoration: underline;
}

/* Collection indicators - top right corner, above price badge */
.collection-indicator {
    position: absolute;
    top: 0.25rem;
    right: calc(0.25rem + (var(--indicator-index, 0) * 23px));
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s ease;
    z-index: 10;
}

.collection-indicator:hover {
    transform: scale(1.1);
}

/* Bottom info icons */
.terrain-card .card-body > div:last-child i {
    font-size: 1em;
    color: #6c757d;
}

/* Card image (vehicles) */
.terrain-card .card-img-top {
    height: 150px;
    object-fit: cover;
    border-radius: 15px;
    border: 1px solid var(--bs-border-color);
}

.terrain-card .card-img-placeholder {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ecf0f1, #bdc3c7);
    border-radius: 15px;
}

.terrain-card .card-img-placeholder--hidden {
    display: none;
}

.terrain-card .card-img-placeholder i {
    font-size: 5rem;
    opacity: 0.4;
    color: #6c757d;
}

/* Terrain map */
.terrain-map {
    height: 150px;
    border-radius: 10px;
    margin-bottom: 15px;
    cursor: pointer;
}

.terrain-map .leaflet-control-attribution {
    font-size: 0.65rem;
    padding: 2px 4px;
    background-color: rgba(255, 255, 255, 0.7);
}
