/* Public Beni Sahiplen pages are V3-only; App.razor loads this file with the V3 workspace styles. */

.adoption-public {
    display: grid;
    gap: 2rem;
}

.adoption-hero {
    max-width: 58rem;
}

.adoption-hero h1 {
    margin: .35rem 0 .8rem;
    font-size: clamp(2rem, 5vw, 4.5rem);
    line-height: .98;
}

.adoption-hero > p:last-child {
    max-width: 48rem;
    color: var(--muted-text, #536078);
    line-height: 1.7;
}

.adoption-filters {
    display: grid;
    grid-template-columns: .7fr .45fr .8fr 1.4fr auto;
    gap: .8rem;
    align-items: end;
    padding: 1rem;
    border: 1px solid rgba(22, 36, 72, .12);
    border-radius: 1.35rem;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 18px 50px rgba(23, 35, 71, .08);
}

.adoption-filters label {
    display: grid;
    gap: .35rem;
    min-width: 0;
    font-weight: 700;
}

.adoption-filters label span {
    font-size: .78rem;
}

.adoption-filters input,
.adoption-filters select {
    min-height: 2.8rem;
    width: 100%;
    border: 1px solid rgba(22, 36, 72, .2);
    border-radius: .8rem;
    padding: .65rem .75rem;
    background: #fff;
    color: inherit;
}

.adoption-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.adoption-card {
    overflow: hidden;
    border: 1px solid rgba(22, 36, 72, .12);
    border-radius: 1.35rem;
    background: #fff;
    box-shadow: 0 18px 50px rgba(23, 35, 71, .08);
}

.adoption-card-media {
    display: grid;
    min-height: 14rem;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(145deg, #fff1e8, #e9e9ff);
    color: #ed6a2c;
    font-size: 4rem;
}

.adoption-card-media img {
    width: 100%;
    height: 14rem;
    object-fit: cover;
    transition: transform .25s ease;
}

.adoption-card:hover .adoption-card-media img {
    transform: scale(1.025);
}

.adoption-card-body {
    display: grid;
    gap: .55rem;
    padding: 1rem;
}

.adoption-card h2,
.adoption-card p {
    margin: 0;
}

.adoption-card h2 a {
    color: inherit;
    text-decoration: none;
}

.adoption-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.adoption-card-tags span,
.translation-badge {
    border-radius: 999px;
    padding: .28rem .55rem;
    background: #f1f2fb;
    color: #444d78;
    font-size: .72rem;
    font-weight: 800;
}

.animal-name {
    color: #ed6a2c;
    font-weight: 800;
}

.publisher {
    color: var(--muted-text, #536078);
    font-size: .86rem;
}

.adoption-state {
    padding: 2rem;
    border: 1px dashed rgba(22, 36, 72, .22);
    border-radius: 1.35rem;
    text-align: center;
    background: rgba(255, 255, 255, .75);
}

.adoption-state h2,
.adoption-state p {
    margin: .35rem 0;
}

.adoption-state.error {
    border-color: rgba(174, 44, 55, .35);
}

@media (max-width: 960px) {
    .adoption-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .search-field,
    .adoption-filters .primary-button {
        grid-column: span 2;
    }

    .adoption-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .adoption-filters,
    .adoption-grid {
        grid-template-columns: 1fr;
    }

    .search-field,
    .adoption-filters .primary-button {
        grid-column: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .adoption-card-media img {
        transition: none;
    }
}

.adoption-detail {
    display: grid;
    gap: 1.25rem;
}

.back-link {
    width: fit-content;
    color: #4b4c77;
    font-weight: 800;
    text-decoration: none;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(20rem, .85fr);
    gap: clamp(1.25rem, 4vw, 3rem);
    align-items: start;
}

.detail-gallery,
.detail-copy {
    min-width: 0;
}

.detail-photo {
    position: relative;
    display: grid;
    min-height: 31rem;
    place-items: center;
    overflow: hidden;
    border-radius: 1.5rem;
    background: linear-gradient(145deg, #fff1e8, #e9e9ff);
}

.detail-photo img {
    width: 100%;
    height: 31rem;
    object-fit: cover;
}

.detail-photo.placeholder {
    color: #ed6a2c;
    font-size: 6rem;
}

.gallery-previous,
.gallery-next {
    position: absolute;
    top: 50%;
    width: 2.8rem;
    height: 2.8rem;
    border: 0;
    border-radius: 50%;
    background: rgba(20, 25, 54, .82);
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    transform: translateY(-50%);
}

.gallery-previous { left: .8rem; }
.gallery-next { right: .8rem; }

.gallery-thumbnails {
    display: flex;
    gap: .55rem;
    overflow-x: auto;
    padding: .65rem .1rem;
    scroll-snap-type: x mandatory;
}

.gallery-thumbnails button {
    flex: 0 0 4.5rem;
    height: 4.5rem;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: .8rem;
    padding: 0;
    background: #fff;
    cursor: pointer;
    scroll-snap-align: start;
}

.gallery-thumbnails button.selected {
    border-color: #ed6a2c;
}

.gallery-thumbnails img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-copy {
    display: grid;
    gap: 1rem;
    padding: clamp(1.2rem, 3vw, 2rem);
    border: 1px solid rgba(22, 36, 72, .12);
    border-radius: 1.5rem;
    background: #fff;
    box-shadow: 0 18px 50px rgba(23, 35, 71, .08);
}

.detail-copy h1,
.detail-copy p,
.publisher-panel,
.publisher-panel dd {
    margin: 0;
}

.detail-copy h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.detail-tags span {
    border-radius: 999px;
    padding: .35rem .65rem;
    background: #f1f2fb;
    color: #444d78;
    font-size: .76rem;
    font-weight: 800;
}

.detail-animal-name {
    color: #ed6a2c;
    font-size: 1.15rem;
    font-weight: 900;
}

.content-language {
    color: #697087;
    font-size: .82rem;
    font-weight: 800;
}

.detail-description {
    color: #323a52;
    line-height: 1.75;
    white-space: pre-line;
}

.translation-notice {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    align-items: center;
    justify-content: space-between;
    padding: .7rem .8rem;
    border-radius: .9rem;
    background: #f5f0ff;
    color: #514077;
    font-size: .82rem;
    font-weight: 700;
}

.translation-notice button {
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font-weight: 900;
    text-decoration: underline;
    cursor: pointer;
}

.publisher-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
}

.publisher-panel div,
.intermediary-note {
    padding: .85rem;
    border-radius: 1rem;
    background: #f8f8fc;
}

.publisher-panel dt {
    margin-bottom: .3rem;
    color: #697087;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.publisher-panel dd {
    font-weight: 800;
}

.intermediary-note {
    border-left: 4px solid #ed6a2c;
}

.intermediary-note p {
    margin-top: .35rem;
    color: #535b72;
    line-height: 1.55;
}

.detail-state {
    padding: 3rem 1rem;
    border: 1px dashed rgba(22, 36, 72, .22);
    border-radius: 1.35rem;
    text-align: center;
}

@media (max-width: 900px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-photo,
    .detail-photo img {
        min-height: 22rem;
        height: 22rem;
    }
}

@media (max-width: 560px) {
    .publisher-panel {
        grid-template-columns: 1fr;
    }

    .detail-photo,
    .detail-photo img {
        min-height: 18rem;
        height: 18rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-thumbnails {
        scroll-behavior: auto;
    }
}

