/* ========================================================
   Spishri Photo Reviews – Frontend Styles
   Brand color: #AF4644
   ======================================================== */

/* ---------- Upload field ---------- */
.spishri-pr-upload-wrap {
    margin: 18px 0 10px;
}

.spishri-pr-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    color: #333;
}

.spishri-pr-optional {
    font-weight: 400;
    color: #888;
    font-size: 13px;
}

/* ---------- Dropzone ---------- */
.spishri-pr-dropzone {
    border: 2px dashed #AF4644;
    border-radius: 10px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    background: #fff8f8;
    transition: background 0.2s, border-color 0.2s;
    position: relative;
    user-select: none;
}

.spishri-pr-dropzone:hover,
.spishri-pr-dropzone:focus,
.spishri-pr-dropzone.is-dragover {
    background: #fdeaea;
    border-color: #7f2020;
    outline: none;
}

.spishri-pr-upload-icon {
    display: block;
    font-size: 28px;
    margin-bottom: 6px;
    font-style: normal;
    color: #AF4644;
}

.spishri-pr-drop-text {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #AF4644;
    margin-bottom: 4px;
}

.spishri-pr-drop-hint {
    display: block;
    font-size: 12px;
    color: #999;
}

/* ---------- Preview grid ---------- */
.spishri-pr-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.spishri-pr-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 1.5px solid #ddd;
    background: #f5f5f5;
}

.spishri-pr-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.spishri-pr-preview-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    z-index: 2;
}

.spishri-pr-preview-remove:hover {
    background: #AF4644;
}

.spishri-pr-status {
    font-size: 13px;
    color: #e53935;
    margin: 6px 0 0;
    min-height: 1em;
}

.spishri-pr-status.success {
    color: #2e7d32;
}

/* ---------- Review photo thumbnails (in review list) ---------- */
.spishri-pr-review-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.spishri-pr-review-photos img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    border: 1.5px solid #e0e0e0;
    cursor: zoom-in;
    transition: transform 0.15s, border-color 0.15s;
}

.spishri-pr-review-photos img:hover {
    transform: scale(1.05);
    border-color: #AF4644;
}

/* ---------- All-photos gallery section ---------- */
.spishri-pr-gallery-section {
    padding: 24px 0 32px;
    border-top: 1px solid #f0e8e8;
    margin-top: 10px;
}

.spishri-pr-gallery-title {
    font-size: 18px;
    font-weight: 700;
    color: #AF4644;
    margin: 0 0 16px;
}

.spishri-pr-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}

@media (min-width: 768px) {
    .spishri-pr-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

.spishri-pr-gallery-item {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 1 / 1;
    background: #f5f5f5;
    text-decoration: none;
}

.spishri-pr-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.spishri-pr-gallery-item:hover img {
    transform: scale(1.07);
}

.spishri-pr-gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.55));
    padding: 18px 8px 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.spishri-pr-gallery-item:hover .spishri-pr-gallery-overlay {
    opacity: 1;
}

.spishri-pr-gallery-author {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Lightbox ---------- */
.spishri-pr-lb-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99998;
}

.spishri-pr-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
}

.spishri-pr-lb-inner {
    max-width: 90vw;
    max-height: 85vh;
    text-align: center;
    position: relative;
}

.spishri-pr-lb-inner img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 6px;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 40px rgba(0,0,0,0.6);
}

.spishri-pr-lb-caption {
    color: #eee;
    font-size: 13px;
    margin-top: 10px;
    text-align: center;
}

.spishri-pr-lb-close,
.spishri-pr-lb-prev,
.spishri-pr-lb-next {
    position: fixed;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    font-size: 20px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 100000;
}

.spishri-pr-lb-close:hover,
.spishri-pr-lb-prev:hover,
.spishri-pr-lb-next:hover {
    background: rgba(175, 70, 68, 0.8);
}

.spishri-pr-lb-close {
    top: 16px;
    right: 16px;
    font-size: 26px;
}

.spishri-pr-lb-prev {
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.spishri-pr-lb-next {
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 480px) {
    .spishri-pr-lb-prev { left: 4px; }
    .spishri-pr-lb-next { right: 4px; }
    .spishri-pr-lb-close { top: 8px; right: 8px; }
    .spishri-pr-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}
