/* ============================================
   MADx Hub Editor Styles
   v5.0 - Unified black/red/white theme
   ============================================ */

/* ========== POPUP EDIT/DELETE BUTTONS ========== */

.he-popup-actions {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #222;
    display: flex;
    gap: 8px;
}

.he-popup-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: opacity 0.15s;
}

.he-popup-btn:hover {
    opacity: 0.85;
}

.he-delete-btn {
    background: #e63946;
    color: #fff;
}

/* ========== DELETE CONFIRMATION MODAL ========== */

#hub-delete-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
}

.he-delete-modal {
    background: #0a0a1a;
    border: 1px solid #333;
    border-top: 2px solid #e63946;
    border-radius: 12px;
    padding: 28px;
    max-width: 420px;
    width: 90%;
    color: #e0e0e0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.he-delete-modal h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    color: #e63946;
}

.he-delete-modal .he-warning {
    background: rgba(230, 57, 70, 0.08);
    border: 1px solid rgba(230, 57, 70, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #ff8a8a;
}

.he-detail-row {
    padding: 4px 0;
    font-size: 13px;
    line-height: 1.5;
}

.he-detail-row strong {
    color: #888;
}

.he-delete-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.he-cancel-btn {
    padding: 10px 20px;
    border: 1px solid #333;
    border-radius: 8px;
    background: transparent;
    color: #ccc;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s;
}

.he-cancel-btn:hover {
    border-color: #e63946;
    color: #fff;
}

.he-confirm-delete-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: #e63946;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.15s;
}

.he-confirm-delete-btn:hover {
    background: #d32f3f;
}

.he-confirm-delete-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ========== PIN DROP ARMED BAR ========== */

#he-armed-bar {
    display: none;
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9000;
    background: #0a0a1a;
    border: 1px solid #e63946;
    color: #fff;
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

#he-armed-bar .he-armed-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e63946;
    animation: he-pulse 1.2s ease-in-out infinite;
}

@keyframes he-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

#he-armed-bar button {
    padding: 4px 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s;
}

#he-armed-bar button:hover {
    border-color: #e63946;
    background: rgba(230, 57, 70, 0.1);
}

/* ========== PIN DROP FORM MODAL ========== */

#hub-pindrop-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
}

.he-pindrop-modal {
    background: #0a0a1a;
    border: 1px solid #333;
    border-top: 2px solid #e63946;
    border-radius: 12px;
    padding: 28px;
    max-width: 480px;
    width: 92%;
    color: #e0e0e0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    max-height: 90vh;
    overflow-y: auto;
}

.he-pindrop-modal h3 {
    margin: 0 0 6px 0;
    font-size: 18px;
    color: #fff;
}

.he-pin-coords {
    font-size: 12px;
    color: #666;
    font-family: monospace;
    margin-bottom: 16px;
}

.he-field {
    margin-bottom: 14px;
}

.he-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #e63946;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.he-field select,
.he-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #333;
    border-radius: 8px;
    background: #111;
    color: #e0e0e0;
    font-size: 14px;
    box-sizing: border-box;
}

.he-field select:focus,
.he-field input:focus {
    outline: none;
    border-color: #e63946;
}

.he-row {
    display: flex;
    gap: 10px;
}

.he-row .he-field {
    flex: 1;
}

.he-divider {
    height: 1px;
    background: #222;
    margin: 16px 0;
}

.he-pin-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.he-pin-cancel-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid #333;
    border-radius: 8px;
    background: transparent;
    color: #ccc;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s;
}

.he-pin-cancel-btn:hover {
    border-color: #e63946;
    color: #fff;
}

.he-pin-submit-btn {
    flex: 2;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #e63946;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.15s;
}

.he-pin-submit-btn:hover {
    background: #d32f3f;
}

.he-pin-submit-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.he-pin-status-msg {
    margin-top: 10px;
    font-size: 13px;
    color: #e63946;
    text-align: center;
}

/* ========== SELECT MODE ========== */

/* Select mode active button state */
.he-select-active {
    background: #e63946 !important;
    color: #fff !important;
}

/* Floating select bar */
#he-select-bar {
    display: none;
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9000;
    background: #0a0a1a;
    border: 1px solid #e63946;
    color: #fff;
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    align-items: center;
    gap: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

#he-select-bar span {
    min-width: 100px;
}

#he-select-bar button {
    padding: 6px 16px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

#he-select-delete-btn {
    background: #e63946;
    color: #fff;
}

#he-select-delete-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#he-select-bar button:last-child {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
}

#he-select-bar button:last-child:hover {
    border-color: #e63946;
    background: rgba(230, 57, 70, 0.1);
}

/* Bulk delete count message in modal */
.he-delete-count-msg {
    font-size: 15px;
    font-weight: 700;
    color: #e63946;
    text-align: center;
    margin-top: 12px;
}