﻿.campground-card-wrapper {
    position: relative;
}

.campground-card {
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
    border: 1px solid var(--pa-border);
    border-radius: var(--radius);
    transition: box-shadow var(--transition), border-color var(--transition);
    text-decoration: none;
    color: inherit;
}

    .campground-card:hover {
        box-shadow: var(--shadow-md);
        border-color: var(--brand);
    }

.campground-card-image {
    position: relative;
    flex: 0 0 200px;
}

    .campground-card-image img {
        width: 200px;
        height: 200px;
        object-fit: cover;
        border-radius: calc(var(--radius) - 6px);
        background-color: #f0f0f0;
    }

.favorite-btn {
    position: absolute;
    top: 100px;
    right: 6px;
    z-index: 2;
    width: 35px;
    height: 35px;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
    cursor: pointer;
    transition: color var(--transition), transform var(--transition);
}

    .favorite-btn:hover {
        color: var(--brand-dark);
        transform: scale(1.1);
    }

    .favorite-btn[data-favorited="true"] {
        color: red;
    }

.rentals-favorite-btn {
    top: 70px;
}

.visited-btn {
    position: absolute;
    top: 70px;
    right: 6px;
    z-index: 2;
    width: 35px;
    height: 35px;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
    cursor: pointer;
    transition: color var(--transition), transform var(--transition);
}

    .visited-btn:hover {
        color: var(--brand-dark);
        transform: scale(1.1);
    }

    .visited-btn[data-visited="true"] {
        color: var(--pa-green);
    }

.rentals-visited-btn {
    top: 40px;
}

@media (max-width: 1560px) {
    .visited-btn {
        top: 40px;
    }

    .favorite-btn {
        top: 70px;
    }
}

.card-chevron {
    flex-shrink: 0;
    color: var(--pa-muted);
    font-size: 0.8rem;
    margin-top: 0.2rem;
    transition: transform var(--transition), color var(--transition);
}

.campground-card:hover .card-chevron {
    color: var(--brand);
    transform: translateX(3px);
}

.campground-card-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.campground-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.campground-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--brand);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.campground-location {
    font-size: 1.0rem;
    color: var(--pa-muted);
    margin: 0.15rem 0;
}

.campground-meta {
    font-size: 1.0rem;
    color: var(--pa-muted);
}

.campground-card-footer {
    display: flex;
    margin-top: auto;
    container-type: inline-size;
}

.rentals-text {
    display: -webkit-box;
    -webkit-line-clamp: 5; /* number of lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.campground-rates {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

@container (max-width: 320px) {
    .campground-rates {
        flex-direction: column;
        margin-top: 10px;
    }
}

.rate-block {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    padding: 0.35rem 0.6rem;
    border-radius: 8px;
    line-height: 1.3;
}

.rate-regular {
    background: #f4f4f2;
}

    .rate-regular .rate-amount {
        color: var(--pa-muted);
        text-decoration: line-through;
        text-decoration-color: #b4b2a9;
    }

.rate-pa {
    background: #EAF3DE;
}

    .rate-pa .rate-label {
        color: #3B6D11;
    }

    .rate-pa .rate-amount {
        color: #173404;
    }

.rate-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--pa-muted);
    white-space: nowrap;
}

    .rate-label .fa-star {
        color: #3B6D11;
        font-size: 0.65rem;
    }

.rate-amount {
    font-size: 1.25rem;
    font-weight: 700;
}

@media (max-width: 576px) {
    .campground-card {
        flex-direction: column;
        gap: 0.5rem;
    }

    .campground-card-image {
        flex: 0 0 auto;
        width: 100%;
    }

        .campground-card-image img {
            width: 100%;
            height: 180px;
        }

    .favorite-btn,
    .visited-btn {
        top: auto;
        bottom: 120px;
    }

    .favorite-btn {
        right: 8px;
    }

    .visited-btn {
        right: 46px;
    }

    .campground-name {
        font-size: 1.1rem;
        white-space: normal;
    }
}
