/* bugreport.css — BugRewt modal styling (storm theme) v=20260304a */

#bugrewt-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 99990;
}
#bugrewt-overlay.active { display: flex; align-items: center; justify-content: center; }

#bugrewt-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 560px;
    max-width: 95vw;
    max-height: 90vh;
    background: #0d0d1a;
    border: 1px solid #d4af37;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.8), 0 0 20px rgba(212,175,55,0.15);
    z-index: 99991;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    resize: both;
    min-width: 380px;
    min-height: 400px;
}

/* Header — draggable */
.bugrewt-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-bottom: 1px solid rgba(212,175,55,0.3);
    cursor: move;
    user-select: none;
    flex-shrink: 0;
}
.bugrewt-header i { color: #d4af37; margin-right: 10px; font-size: 18px; }
.bugrewt-header-title { color: #d4af37; font-weight: 700; font-size: 15px; flex: 1; }
.bugrewt-header-close {
    background: none; border: none; color: #888; font-size: 18px; cursor: pointer; padding: 4px 8px;
}
.bugrewt-header-close:hover { color: #ef4444; }

/* Body — scrollable */
.bugrewt-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* Screenshot preview */
.bugrewt-screenshot-wrap {
    margin-bottom: 14px;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    background: #111;
    text-align: center;
}
.bugrewt-screenshot-wrap img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Info grid */
.bugrewt-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}
.bugrewt-info-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid #222;
    border-radius: 6px;
    padding: 8px 10px;
}
.bugrewt-info-label { font-size: 10px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }
.bugrewt-info-value { font-size: 13px; color: #e0e0e0; word-break: break-all; margin-top: 2px; }

/* Form fields */
.bugrewt-field { margin-bottom: 12px; }
.bugrewt-field label { display: block; font-size: 12px; color: #aaa; margin-bottom: 4px; font-weight: 600; }
.bugrewt-textarea {
    width: 100%;
    min-height: 80px;
    background: #111;
    border: 1px solid #333;
    border-radius: 6px;
    color: #e0e0e0;
    padding: 10px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
}
.bugrewt-textarea:focus { border-color: #d4af37; outline: none; }

.bugrewt-select {
    width: 100%;
    background: #111;
    border: 1px solid #333;
    border-radius: 6px;
    color: #e0e0e0;
    padding: 8px 10px;
    font-size: 13px;
}
.bugrewt-select:focus { border-color: #d4af37; outline: none; }

/* Extra screenshots gallery */
.bugrewt-gallery { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.bugrewt-gallery-thumb {
    width: 80px; height: 60px;
    object-fit: cover;
    border: 1px solid #333;
    border-radius: 4px;
    cursor: pointer;
}
.bugrewt-gallery-thumb:hover { border-color: #d4af37; }

.bugrewt-add-ss {
    background: none;
    border: 1px dashed #555;
    border-radius: 6px;
    color: #888;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}
.bugrewt-add-ss:hover { border-color: #d4af37; color: #d4af37; }

/* Footer */
.bugrewt-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid #222;
    flex-shrink: 0;
}
.bugrewt-btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}
.bugrewt-btn-cancel {
    background: none;
    border-color: #555;
    color: #aaa;
}
.bugrewt-btn-cancel:hover { border-color: #888; color: #fff; }
.bugrewt-btn-send {
    background: linear-gradient(135deg, #d4af37, #b8962e);
    color: #0a0a12;
    border-color: #d4af37;
}
.bugrewt-btn-send:hover { filter: brightness(1.1); }
.bugrewt-btn-send:disabled { opacity: 0.5; cursor: not-allowed; }

/* Small screens — kiosks, tablets */
@media (max-height: 700px) {
    #bugrewt-modal { min-height: 300px; max-height: 95vh; }
    .bugrewt-body { padding: 10px; }
    .bugrewt-screenshot-wrap img { max-height: 120px; }
    .bugrewt-info { grid-template-columns: 1fr; gap: 4px; }
    .bugrewt-info-item { padding: 4px 8px; }
    .bugrewt-textarea { min-height: 50px; }
    .bugrewt-field { margin-bottom: 8px; }
    .bugrewt-footer { padding: 8px 12px; }
}
@media (max-width: 480px) {
    #bugrewt-modal { min-width: 280px; width: 98vw; }
}

/* Capture flash */
.bugrewt-flash {
    position: fixed; inset: 0;
    background: rgba(255,255,255,0.3);
    z-index: 99989;
    pointer-events: none;
    animation: bugrewt-flash-anim 0.3s ease-out forwards;
}
@keyframes bugrewt-flash-anim {
    0% { opacity: 1; }
    100% { opacity: 0; }
}
