/* Grypes Images — composer, gallery, lightbox */

/* ---- Composer image picker ---- */
.gyi-upload-area {
    margin: 12px 0;
    border: 2px dashed #c8d8f0;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: border-color .15s, background .15s;
}
.gyi-upload-area:hover,
.gyi-upload-area.gyi-dragover {
    border-color: #0066ff;
    background: #f0f6ff;
}
.gyi-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 2px solid #0066ff;
    color: #0066ff;
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.gyi-upload-btn:hover { background: #0066ff; color: #fff; }
.gyi-warning {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    line-height: 1.4;
}
.gyi-preview-grid {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.gyi-preview {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e0e8f5;
}
.gyi-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gyi-preview .gyi-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,.7);
    color: #fff;
    border: none;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}
.gyi-preview .gyi-move {
    position: absolute;
    bottom: 4px;
    background: rgba(0,0,0,.6);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    padding: 2px 6px;
    cursor: pointer;
}
.gyi-preview .gyi-move-left { left: 4px; }
.gyi-preview .gyi-move-right { right: 4px; }
.gyi-upload-progress {
    font-size: 13px;
    color: #0066ff;
    margin-top: 8px;
}

/* ---- Feed gallery ---- */
.gyi-gallery {
    display: grid;
    gap: 6px;
    margin-top: 10px;
    border-radius: 12px;
    overflow: hidden;
}
.gyi-gallery[data-count="1"] { grid-template-columns: 1fr; }
.gyi-gallery[data-count="2"] { grid-template-columns: 1fr 1fr; }
.gyi-gallery[data-count="3"] { grid-template-columns: 1fr 1fr 1fr; }
.gyi-thumb {
    border: none;
    padding: 0;
    cursor: zoom-in;
    background: #f0f2f5;
    aspect-ratio: 1;
    overflow: hidden;
    position: relative;
}
.gyi-gallery[data-count="1"] .gyi-thumb { aspect-ratio: 16/9; }
.gyi-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gyi-thumb:hover img { transform: scale(1.02); }
.gyi-thumb img { transition: transform .2s ease; }

/* ---- Lightbox ---- */
.gyi-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, .92);
    display: flex;
    align-items: center;
    justify-content: center;
}
.gyi-lightbox[hidden] { display: none; }
.gyi-lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 8px;
}
.gyi-lb-close,
.gyi-lb-prev,
.gyi-lb-next {
    position: absolute;
    background: rgba(255,255,255,.15);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gyi-lb-close:hover,
.gyi-lb-prev:hover,
.gyi-lb-next:hover { background: rgba(255,255,255,.3); }
.gyi-lb-close { top: 16px; right: 16px; }
.gyi-lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.gyi-lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.gyi-lb-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    background: rgba(0,0,0,.5);
    padding: 4px 12px;
    border-radius: 999px;
}

/* ---- Frontend admin dashboard (admin-only) ---- */
.gyi-admin-dash {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}
.gyi-admin-dash h2 {
    font-size: 24px;
    margin-bottom: 12px;
}
.gyi-dash-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 8px;
}
.gyi-dash-tab {
    padding: 8px 16px;
    border-radius: 8px 8px 0 0;
    text-decoration: none;
    color: #666;
    font-weight: 600;
    font-size: 15px;
}
.gyi-dash-tab.active {
    color: #0066ff;
    background: #f0f6ff;
}
.gyi-dash-search {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.gyi-dash-search input[type="text"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}
.gyi-dash-search button {
    padding: 10px 20px;
    background: #0066ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}
.gyi-grype-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.gyi-grype-row {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 14px 16px;
    background: #fff;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.gyi-grype-main { flex: 1; min-width: 0; }
.gyi-grype-title { font-weight: 700; margin: 0 0 4px 0; font-size: 15px; }
.gyi-grype-excerpt { margin: 0 0 6px 0; color: #444; font-size: 14px; }
.gyi-grype-meta { margin: 0; color: #888; }
.gyi-grype-actions { flex-shrink: 0; }
.gyi-btn-delete-grype {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
}
.gyi-grype-confirm {
    flex-basis: 100%;
    background: #fff3cd;
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
}
.gyi-grype-confirm[hidden] { display: none; }
.gyi-grype-confirm p { margin: 0 0 8px 0; font-weight: 600; }
.gyi-btn-confirm-delete {
    background: #dc3545; color: #fff; border: none;
    padding: 8px 16px; border-radius: 6px; cursor: pointer; margin-right: 8px;
}
.gyi-btn-cancel-delete {
    background: #6c757d; color: #fff; border: none;
    padding: 8px 16px; border-radius: 6px; cursor: pointer;
}
.gyi-dash-pagination { margin-top: 20px; text-align: center; }
.gyi-dash-pagination .page-numbers {
    display: inline-block; padding: 6px 12px; margin: 0 2px;
    border: 1px solid #ddd; border-radius: 6px; text-decoration: none;
}
.gyi-dash-pagination .current { background: #0066ff; color: #fff; border-color: #0066ff; }
.gyi-dash-sub {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}
.gyi-dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.gyi-dash-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
.gyi-dash-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.gyi-dash-info {
    padding: 12px 16px;
}
.gyi-dash-status {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
}
.gyi-status-pending { background: #fff3cd; color: #856404; }
.gyi-status-flagged { background: #f8d7da; color: #721c24; }
.gyi-dash-anon {
    display: inline-block;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e2e3e5;
    color: #383d41;
    margin-left: 6px;
}
.gyi-dash-grype {
    font-size: 14px;
    margin: 8px 0;
    color: #333;
}
.gyi-dash-flags, .gyi-dash-safe, .gyi-dash-meta {
    margin: 4px 0;
    color: #666;
}
.gyi-dash-actions {
    display: flex;
    gap: 8px;
    padding: 0 16px 16px;
}
.gyi-btn-approve, .gyi-btn-reject {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.gyi-btn-approve {
    background: #28a745;
    color: #fff;
}
.gyi-btn-approve:hover { background: #218838; }
.gyi-btn-reject {
    background: #dc3545;
    color: #fff;
}
.gyi-btn-reject:hover { background: #c82333; }
.gyi-dash-reject-form {
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.gyi-dash-reject-form[hidden] { display: none; }
.gyi-dash-reject-form select,
.gyi-dash-reject-form input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}
.gyi-btn-confirm-reject {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
}
.gyi-btn-cancel-reject {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
}
.gyi-dash-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    background: #f8f9fa;
    border-radius: 12px;
}

/* ---- Pending review notice (author only) ---- */
.gyi-pending-notice {
    margin-top: 10px;
    padding: 12px 16px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 10px;
    font-size: 14px;
}
.gyi-pending-notice p { margin: 0 0 4px 0; }
.gyi-pending-notice .gyi-pending-sub {
    font-size: 12px;
    color: #666;
    margin: 0;
}
.gyi-preview.gyi-pending {
    border-style: dashed;
    border-color: #ffb300;
}

/* ---- Report button ---- */
.gyi-report-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    padding: 4px 0;
}
.gyi-report-btn:hover { color: #c00; }
