/**
 * Puppy Widget Styles
 * Self-contained card-grid styles for the [puppyspot_listing] shortcode.
 *
 * Matches the live dogacademy.org "Puppies For Sale" listing look (light-blue
 * container, white rounded cards, red "Puppy For Sale" badge, 220px cover
 * thumbnail, green primary buttons) but is framework-agnostic: it does NOT
 * depend on Bootstrap or the theme. All colors, grid, button, and spacing rules
 * are reproduced here from the bootscore-child theme so the widget looks
 * identical whether or not the theme's CSS is present.
 */

/* Container -------------------------------------------------------------- */
.widget-grid {
    background-color: #dae9fc;
    margin: 20px 0;
    padding: 20px;
    box-sizing: border-box;
}

.widget-grid *,
.widget-grid *::before,
.widget-grid *::after {
    box-sizing: border-box;
}

.widget-grid .widget-row {
    padding: 8px;
}

.widget-grid .widget-title {
    text-align: center;
    margin: 0 0 20px;
}

/* Responsive card grid (replaces Bootstrap row/col-md-6/col-lg-4) -------- */
.widget-grid .widget-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 992px) {
    .widget-grid .widget-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .widget-grid .widget-cards {
        grid-template-columns: 1fr;
    }
}

/* Card ------------------------------------------------------------------- */
.widget-grid .widget-card {
    display: flex;
}

.widget-grid article {
    height: 100%;
    width: 100%;
}

.widget-grid .inner {
    border: 1px solid #dee2e6;
    padding: 5px;
    border-radius: 10px;
    background: #fff;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.widget-grid .entry-header {
    margin: 0;
}

/* Thumbnail -------------------------------------------------------------- */
.widget-grid .widget-thumbnail {
    height: 220px;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #dae9fc;
}

.widget-grid .widget-thumbnail a {
    display: block;
    height: 100%;
}

.widget-grid .widget-profile {
    display: block;
    width: 100% !important;
    height: 100% !important;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    max-width: none !important;
    -o-object-fit: cover;
    object-fit: cover;
}

/* Badge ------------------------------------------------------------------ */
.widget-grid .widget-badge {
    z-index: 200;
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 70%;
    color: #fff;
    padding: 3px;
    /* Matches the live dogacademy.org theme rule (badge is red, not cyan):
       .dog-listing-list-item .dog-listing-thumbnail .badge { background: #e32500 !important; } */
    background-color: #e32500;
    display: inline-block;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.365rem;
}

/* Text content ----------------------------------------------------------- */
.widget-grid .widget-grid-text {
    display: flex;
    flex-direction: column;
    flex-grow: 10;
    padding: 1rem;
}

.widget-grid .entry-title {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    line-height: 1.3;
}

.widget-grid .entry-title a {
    text-decoration: none;
    color: inherit;
}

.widget-grid .entry-title a:hover {
    text-decoration: underline;
}

.widget-grid .entry-stats {
    font-size: 80%;
}

.widget-grid .entry-stats > div {
    margin: 0.15rem 0;
}

/* Action / button -------------------------------------------------------- */
.widget-grid .action {
    flex-grow: 2;
    justify-content: flex-end;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 0.75rem;
}

/*
 * Self-contained button (replaces Bootstrap .btn.btn-primary).
 * Colors match the live dogacademy.org theme, where .btn-primary is overridden:
 *   --primary: #2AE197; --primary-hover: #57e7ad; --primary-button-text-color: #1D2F46;
 */
.widget-grid .psw-btn {
    display: inline-block;
    background-color: #2ae197;
    color: #1d2f46;
    border: 1px solid #2ae197;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.widget-grid .psw-btn:hover,
.widget-grid .psw-btn:focus {
    background-color: #57e7ad;
    border-color: #57e7ad;
    color: #1d2f46;
    text-decoration: none;
}

.widget-grid .psw-btn-lg {
    padding: 0.65rem 1.5rem;
    font-weight: 700;
    font-size: 20px;
}

/* Browse-All button row -------------------------------------------------- */
.widget-grid .widget-browse {
    text-align: center;
    padding: 1.25rem 0 0.5rem;
}
