/* RemySpace — photos.css
   Classic album covers, compact grids, photo permalink.
   Not a modern Google Photos layout. */

.rs-photos-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.rs-photos-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.rs-photos-nav a {
    font-size: 13px;
}
.rs-photos-nav a.rs-active {
    font-weight: bold;
    text-decoration: underline;
}
.rs-photos-breadcrumb {
    margin: 0 0 4px;
    font-size: 12px;
    color: var(--rs-muted-text, #555);
}
.rs-photos-summary,
.rs-album-description,
.rs-photo-meta {
    margin: 0 0 10px;
    font-size: 12px;
    color: var(--rs-muted-text, #555);
}
.rs-photos-subheading {
    margin: 14px 0 8px;
    font-size: 14px;
}
.rs-photos-reorder-hint {
    float: right;
    font-size: 11px;
    font-weight: normal;
    color: var(--rs-muted-text, #555);
}

/* Album grid */
.rs-album-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}
.rs-album-card {
    min-width: 0;
}
.rs-album-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--rs-border);
    background: var(--rs-muted-bg, #f6f6f6);
}
.rs-album-cover {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #ddd;
    position: relative;
}
.rs-album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    max-width: 100%;
}
.rs-album-cover-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #666;
}
.rs-album-card-meta {
    display: block;
    padding: 6px 8px;
}
.rs-album-title {
    display: block;
    font-weight: bold;
    font-size: 13px;
    overflow-wrap: anywhere;
}
.rs-album-count,
.rs-album-privacy {
    display: block;
    font-size: 11px;
    color: var(--rs-muted-text, #555);
}

/* Photo grid */
.rs-photo-album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
}
.rs-photo-grid-item {
    display: block;
    min-width: 0;
    border: 1px solid var(--rs-border);
    background: var(--rs-muted-bg, #f3f3f3);
    text-decoration: none;
    color: inherit;
    position: relative;
}
.rs-photo-grid-item.is-dragging {
    opacity: 0.55;
}
.rs-photo-grid-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    max-width: 100%;
    height: auto;
}
.rs-photo-grid-missing {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    font-size: 11px;
    color: #666;
}
.rs-photo-grid-caption,
.rs-photo-grid-meta {
    display: block;
    padding: 3px 5px;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Upload */
.rs-photo-upload-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.rs-photo-upload-preview {
    width: 72px;
    min-width: 0;
    border: 1px solid var(--rs-border);
    background: #fff;
    font-size: 10px;
    text-align: center;
}
.rs-photo-upload-preview img {
    width: 100%;
    height: 56px;
    object-fit: cover;
    display: block;
    max-width: 100%;
}
.rs-photo-upload-preview .rs-upload-progress {
    display: block;
    height: 4px;
    background: #ddd;
}
.rs-photo-upload-preview .rs-upload-progress > span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--rs-link, #003399);
}
.rs-photo-upload-status {
    margin: 8px 0 0;
    font-size: 12px;
}

/* Permalink */
.rs-photo-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 14px;
    align-items: start;
}
@media (max-width: 860px) {
    .rs-photo-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}
.rs-photo-stage {
    position: relative;
    background: #111;
    text-align: center;
    margin-bottom: 10px;
    max-width: 100%;
    overflow: hidden;
}
.rs-photo-permalink-img,
.rs-photo-stage img {
    max-width: 100%;
    height: auto;
    display: inline-block;
    vertical-align: middle;
}
.rs-photo-caption {
    margin: 8px 0 4px;
    font-weight: bold;
    font-size: 14px;
    overflow-wrap: anywhere;
}
.rs-photo-description {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
.rs-photo-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0;
}
.rs-photo-reaction-btn {
    border: 1px solid var(--rs-border);
    background: #fff;
    padding: 3px 8px;
    font-size: 13px;
    cursor: pointer;
}
.rs-photo-reaction-btn.is-active {
    background: var(--rs-muted-bg, #eef3ff);
    border-color: #7a9cc8;
}
.rs-photo-owner-tools,
.rs-photo-tag-tools {
    margin: 12px 0;
    padding-top: 10px;
    border-top: 1px solid var(--rs-border);
}
.rs-photo-owner-tools .rs-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.rs-photo-tag-panel {
    margin-top: 8px;
    padding: 8px;
    border: 1px dashed var(--rs-border);
    background: var(--rs-muted-bg, #f8f8f8);
}
.rs-photo-tag-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.rs-photo-tag-item {
    padding: 4px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--rs-border);
}
.rs-photo-tag-item:last-child {
    border-bottom: 0;
}
.rs-photo-tag-pending {
    color: var(--rs-muted-text, #666);
    font-size: 11px;
}
.rs-photo-tag-markers {
    pointer-events: none;
}
.rs-photo-tag-marker {
    position: absolute;
    transform: translate(-50%, -100%);
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rs-photo-stage.is-tagging {
    cursor: crosshair;
}
.rs-photo-comment-form textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}
.rs-photo-comments {
    margin-top: 12px;
}
.rs-photo-comment {
    border-bottom: 1px solid var(--rs-border);
    padding: 8px 0;
    font-size: 13px;
}
.rs-photo-comment-meta {
    font-size: 12px;
    color: var(--rs-muted-text, #555);
    margin-bottom: 4px;
}
.rs-photo-comment-body {
    overflow-wrap: anywhere;
}
.rs-photo-comment-replies {
    margin-left: 14px;
    border-left: 2px solid var(--rs-border);
    padding-left: 10px;
}
.rs-photo-nav-prevnext {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.rs-photo-report-row {
    margin-top: 12px;
    font-size: 12px;
}

/* Lightbox enhancement for album browsing */
.rs-photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
}
.rs-photo-lightbox[hidden] {
    display: none !important;
}
.rs-photo-lightbox-img {
    max-width: min(100%, 1100px);
    max-height: calc(100vh - 90px);
    width: auto;
    height: auto;
    object-fit: contain;
}
.rs-photo-lightbox-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    color: #fff;
    font-size: 13px;
}
.rs-photo-lightbox-bar a,
.rs-photo-lightbox-bar button {
    color: #fff;
}
.rs-button-danger {
    background: #a33;
    color: #fff;
    border: 1px solid #822;
}

/* Profile module gallery extras */
.rs-photos-module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 5px;
}
.rs-photos-module-grid a {
    display: block;
    min-width: 0;
}
.rs-photos-module-grid img {
    width: 100%;
    height: 64px;
    object-fit: cover;
    border: 1px solid var(--module-border, #a7b6c9);
    max-width: 100%;
    display: block;
}
.rs-photos-module-meta,
.rs-photos-module-view-all {
    margin: 8px 0 0;
    font-size: 12px;
}
