.gallery-photos-button,
.gallery-photos-button .card-title {
    color: #fff;
}

.gallery-photos-button {
    width: 100%;
}

.gallery-photos-camera {
    display: inline-block;
    color: #000;
    height: 50px;
    line-height: 50px;
    font-size: 50px;
    vertical-align: middle;
}

.gallery-photos-camera svg {
    display: inline-block;
    width: 50px;
    height: 50px;
    color: #000;
    fill: currentColor;
    vertical-align: top;
}

.dog-details-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 22px;
    align-items: start;
}

.dog-details-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 28px;
    align-content: start;
}

.dog-profile-open {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
}

.dog-profile-photo,
.dog-profile-placeholder {
    width: 100%;
    height: 144px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.dog-profile-photo.is-placeholder {
    object-fit: contain;
    background: #e8f5d8;
    padding: 12px;
}

.card,
.card-body,
.row > [class*="col-"] {
    min-width: 0;
}

.dog-profile-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef0f1;
    color: #7d8790;
    text-align: center;
    padding: 8px;
}

.dog-details-set {
    grid-column: 1 / -1;
    border-top: 1px solid #e4e9e0;
    padding-top: 14px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.dog-set-tile {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
}

.dog-set-tile img {
    width: 100%;
    height: 175px;
    object-fit: cover;
    object-position: center;
    border-radius: 4px;
    border: 2px solid #e4e4e4;
}

.gallery-header-upload {
    background: #fff;
    color: #477d13;
    border-radius: 4px;
    font-weight: bold;
    padding: 9px 12px;
    text-decoration: none;
    white-space: nowrap;
}

.gallery-header-upload:hover {
    background: #eef8e7;
    color: #477d13;
}

.member-album + .member-album {
    margin-top: 24px;
}

.member-album-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e4eadf;
}

.member-album-head h3 {
    font-size: 17px;
    margin: 0;
}

.member-photo-badge {
    background: #edf6e4;
    color: #477d13;
    font-weight: bold;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.member-photo-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 13px;
}

.member-photo-tile {
    appearance: none;
    background: #fff;
    border: 1px solid #dce4d8;
    border-radius: 6px;
    padding: 5px;
    min-width: 0;
    width: 100%;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 1px 3px #00000012;
}

.member-photo-tile:hover {
    box-shadow: 0 4px 12px #0002;
}

.member-photo-tile img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: #f0f0f0;
    border-radius: 3px;
}

.member-photo-caption {
    display: block;
    font-weight: 600;
    font-size: 13px;
    padding: 9px 6px 6px;
}

.profile-upload-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.profile-slot h3 {
    margin: 0 0 9px;
    text-align: center;
    font-size: 16px;
}

.profile-drop {
    width: 100%;
    aspect-ratio: 4 / 5;
    background: #f4f7f1;
    border: 2px dashed #a8bd95;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 9px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    text-align: center;
    color: #537244;
    padding: 10px;
}

.profile-drop:hover,
.profile-drop.drag {
    background: #eaf4e0;
    border-color: #69aa1d;
}

.profile-drop .fa-camera,
.profile-drop svg {
    font-size: 42px;
    width: 42px;
    height: 42px;
    color: #8ca17c;
}

.profile-drop .prompt {
    font-weight: bold;
    font-size: 13px;
}

.profile-drop small {
    font-size: 11px;
    color: #7c8c77;
}

.profile-drop-preview {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    inset: 0;
    background: #eef0ee;
}

.profile-slot.has-image .profile-drop-preview {
    display: block;
}

.profile-slot.has-image .profile-drop-prompt {
    display: none;
}

.profile-slot-status {
    display: block;
    margin-top: 8px;
    text-align: center;
    color: #477d13;
    font-size: 12px;
    font-weight: bold;
}

.profile-slot-remove {
    display: none;
    margin: 7px auto 0;
    background: none;
    border: 0;
    text-decoration: underline;
    color: #8b3636;
    cursor: pointer;
    font-size: 12px;
}

.profile-slot.has-image .profile-slot-remove {
    display: block;
}

.gallery-drop {
    aspect-ratio: auto;
    min-height: 160px;
}

.gallery-upload-status {
    display: block;
    margin-top: 8px;
    text-align: center;
    color: #477d13;
    font-size: 12px;
    font-weight: bold;
}

.gallery-upload-remove {
    display: block;
    margin: 7px auto 0;
    background: none;
    border: 0;
    text-decoration: underline;
    color: #8b3636;
    cursor: pointer;
    font-size: 12px;
}

.gallery-upload-previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.gallery-upload-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 7px;
    border: 1px solid #dce4d8;
    background: #eef0ee;
}

#galleryPhotoImage {
    max-width: 100%;
    max-height: 78vh;
    object-fit: contain;
}

@media (max-width: 700px) {
    .dog-details-layout {
        grid-template-columns: minmax(0, 1fr) 37%;
        gap: 12px;
    }

    .dog-details-facts {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .dog-profile-photo,
    .dog-profile-placeholder {
        height: 126px;
    }

    .dog-details-set,
    .member-photo-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }

    .dog-set-tile img {
        height: 78px;
    }

    .profile-upload-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }
}
