/* =========================================================
   DOGTHORITY - MY FAVORITES
   Post Favorite MGMT 2.3.0

   BuddyPress supplies the page shell.
   Favorites plugin supplies saved IDs + favorite button logic.
   This file controls the Dogthority card presentation.
   ========================================================= */

/* ---------- PAGE HEADING ---------- */
.dt-favorites-heading {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0 0 28px;
    padding: 2px 0 22px;
    border-bottom: 1px solid #e5e5e5;
}

.dt-favorites-heading-icon {
    flex: 0 0 62px;
    width: 62px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border-radius: 50%;
    background: #fff3f3;
    color: #e31b23;
    font-size: 47px;
    line-height: 1;
    font-family: Arial, sans-serif;
    font-weight: 400;
}

.dt-favorites-heading-copy {
    min-width: 0;
}

.dt-favorites-heading h2 {
    margin: 0 0 6px !important;
    padding: 0 !important;
    border: 0 !important;
    color: #111 !important;
    font-size: 32px !important;
    line-height: 1.12 !important;
    font-weight: 700 !important;
}

.dt-favorites-heading p {
    margin: 0 !important;
    color: #555;
    font-size: 15px;
    line-height: 1.45;
}

/* ---------- GRID ---------- */
.dt-favorites-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 22px;
    margin: 0;
    padding: 0;
}

/* ---------- CARD ---------- */
.dt-favorite-card {
    position: relative;
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 18px;
    min-width: 0;
    min-height: 190px;
    padding: 18px 52px 18px 18px;
    box-sizing: border-box;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dedede;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.045);
}

.dt-favorite-image-link {
    display: block;
    width: 150px;
    height: 150px;
    align-self: center;
    overflow: hidden;
    border: 1px solid #bdbdbd;
    border-radius: 7px;
    text-decoration: none !important;
}

.dt-favorite-image {
    display: block;
    width: 150px !important;
    height: 150px !important;
    max-width: none !important;
    margin: 0 !important;
    object-fit: cover;
    object-position: center;
    border: 0;
    border-radius: 7px;
}

.dt-favorite-image-placeholder {
    align-items: center;
    justify-content: center;
    background: #f4f4f4;
    color: #e31b23;
    font-size: 44px;
}

.dt-favorite-card-body {
    min-width: 0;
    align-self: center;
}

.dt-favorite-title {
    margin: 0 0 13px !important;
    padding: 0 !important;
    border: 0 !important;
    color: #111 !important;
    font-size: 18px !important;
    line-height: 1.28 !important;
    font-weight: 700 !important;
}

.dt-favorite-title a {
    color: #111 !important;
    text-decoration: none !important;
}

.dt-favorite-title a:hover {
    color: #e31b23 !important;
}

/* ---------- FAVORITES CONTROL ---------- */
.dt-favorite-button-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.dt-favorite-button-wrap .simplefavorite-button {
    position: relative;
    z-index: 1;
    display: inline-flex !important;
    align-items: center;
    width: 158px;
    min-width: 158px;
    height: 39px;
    margin: 0 !important;
    padding: 0 13px 0 46px !important;
    box-sizing: border-box;
    background: #fff !important;
    border: 2px solid #e31b23 !important;
    border-radius: 7px !important;
    box-shadow: none !important;
    color: transparent !important;
    opacity: 1 !important;
    font-size: 0 !important;
    line-height: 1 !important;
    text-shadow: none !important;
    cursor: pointer;
}

.dt-favorite-button-wrap .simplefavorite-button::after {
    content: "FAVORITES";
    color: #111;
    font-family: Arial, sans-serif;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .01em;
}

.dt-favorite-button-wrap .simplefavorite-button span,
.dt-favorite-button-wrap .simplefavorite-button i {
    display: none !important;
}

.dt-favorite-button-wrap .simplefavorite-button:hover,
.dt-favorite-button-wrap .simplefavorite-button:focus,
.dt-favorite-button-wrap .simplefavorite-button.active,
.dt-favorite-button-wrap .simplefavorite-button.active:hover {
    background: #fff !important;
    border-color: #e31b23 !important;
    color: transparent !important;
    opacity: 1 !important;
}

/* CSS paw: black outline/shapes inside the red button. */
.dt-favorite-paw {
    position: absolute;
    z-index: 3;
    left: 13px;
    top: 50%;
    width: 24px;
    height: 22px;
    transform: translateY(-50%);
    pointer-events: none;
}

.dt-favorite-paw i,
.dt-favorite-paw b {
    position: absolute;
    display: block;
    background: #111;
}

.dt-favorite-paw i {
    width: 5px;
    height: 7px;
    border-radius: 50%;
}

.dt-favorite-paw i:nth-child(1) { left: 1px; top: 5px; transform: rotate(-24deg); }
.dt-favorite-paw i:nth-child(2) { left: 6px; top: 0; transform: rotate(-8deg); }
.dt-favorite-paw i:nth-child(3) { right: 6px; top: 0; transform: rotate(8deg); }
.dt-favorite-paw i:nth-child(4) { right: 1px; top: 5px; transform: rotate(24deg); }

.dt-favorite-paw b {
    left: 6px;
    bottom: 0;
    width: 12px;
    height: 10px;
    border-radius: 55% 55% 48% 48%;
    transform: rotate(0deg);
}

.dt-favorite-divider {
    width: 100%;
    height: 1px;
    margin: 13px 0 11px;
    background: #e3e3e3;
}

.dt-favorite-excerpt {
    margin: 0 !important;
    color: #444 !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
}

/* ---------- RIGHT CHEVRON ---------- */
.dt-favorite-chevron {
    position: absolute;
    top: 50%;
    right: 17px;
    display: flex;
    width: 25px;
    height: 42px;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    color: #e31b23 !important;
    font-family: Arial, sans-serif;
    font-size: 40px;
    line-height: 1;
    font-weight: 400;
    text-decoration: none !important;
}

.dt-favorite-chevron:hover {
    color: #111 !important;
}

/* ---------- EMPTY STATE ---------- */
.dt-favorites-empty {
    padding: 26px;
    background: #fff;
    border: 1px solid #dedede;
    border-radius: 10px;
    color: #555;
    font-size: 15px;
}

/* ---------- RESPONSIVE ---------- */
@media screen and (max-width: 1050px) {
    .dt-favorite-card {
        grid-template-columns: 125px minmax(0, 1fr);
        min-height: 165px;
        gap: 15px;
        padding: 15px 44px 15px 15px;
    }

    .dt-favorite-image-link,
    .dt-favorite-image {
        width: 125px !important;
        height: 125px !important;
    }
}

@media screen and (max-width: 840px) {
    .dt-favorites-grid {
        grid-template-columns: 1fr;
    }

    .dt-favorite-card {
        grid-template-columns: 145px minmax(0, 1fr);
    }

    .dt-favorite-image-link,
    .dt-favorite-image {
        width: 145px !important;
        height: 145px !important;
    }
}

@media screen and (max-width: 560px) {
    /* 2.3 mobile-only refinement: use more screen width and tighten card contents. */
    .dt-favorites-heading,
    .dt-favorites-grid {
        width: calc(100% + 24px);
        max-width: none;
        margin-left: -12px;
        margin-right: -12px;
    }

    .dt-favorites-heading {
        gap: 10px;
    }

    .dt-favorites-heading-icon {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
        font-size: 32px;
    }

    .dt-favorites-heading h2 {
        font-size: 22px !important;
    }

    .dt-favorites-heading p {
        font-size: 12px;
    }

    .dt-favorite-card {
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 10px;
        min-height: 112px;
        padding: 12px 34px 12px 12px;
    }

    .dt-favorite-image-link,
    .dt-favorite-image {
        width: 82px !important;
        height: 82px !important;
    }

    .dt-favorite-title {
        margin-bottom: 7px !important;
        font-size: 14px !important;
        line-height: 1.25 !important;
    }

    .dt-favorite-button-wrap .simplefavorite-button {
        width: 122px;
        min-width: 122px;
        height: 31px;
        padding-left: 37px !important;
        font-size: 11px !important;
    }

    .dt-favorite-paw {
        left: 9px;
        transform: translateY(-50%) scale(.76);
    }

    .dt-favorite-divider,
    .dt-favorite-excerpt {
        display: none;
    }

    .dt-favorite-chevron {
        right: 9px;
    }
}
