/* ============================================
   inLiker History & Admin – Low‑contrast professional design
   ============================================ */

/* ---------- Shared Container ---------- */
.inliker-ha-container {
    max-width: 600px;
    margin: 16px auto;
    padding: 14px;
    background: #1a1a1a;
    border-radius: 12px;
    color: #aaa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.ha-heading {
    color: #aaa;
    text-align: center;
    margin: 0 0 12px 0;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.inliker-ha-error,
.ha-no-orders {
    text-align: center;
    color: #888;
    padding: 20px 0;
}

/* ---------- Tiles Grid ---------- */
.ha-tiles {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ha-tile {
    background: #1c1c1c;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    transition: background 0.2s;
}
.ha-tile:hover {
    background: #222;
}

/* ---------- Capsule for date, order id, customer ---------- */
.ha-capsule {
    display: inline-block;
    background: #1c1c1c;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 11px;
    color: #888;
    white-space: nowrap;
}

/* ---------- Left Block ---------- */
.ha-left {
    flex: 1;
    min-width: 0;
}

.ha-date,
.ha-order-id {
    margin-bottom: 2px;
    line-height: 1.4;
}

/* Service Tablet */
.ha-service-tablet {
    display: flex;
    align-items: center;
    background: #1c1c1c;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 1px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #bbb;
    margin-bottom: 4px;
    gap: 6px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: fit-content;
}

.ha-customer {
    font-size: 12px;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
}
.ha-customer .ha-capsule strong {
    color: #bbb;
    font-weight: 600;
}
.ha-customer .ha-email {
    font-size: 11px;
    color: #888;
    margin-left: 4px;
}

/* View Comments Button */
.ha-view-btn {
    background: transparent;
    border: 1px solid #444;
    border-radius: 10px;
    padding: 0 6px;
    font-size: 10px;
    color: #999;
    cursor: pointer;
    transition: 0.2s;
    line-height: 1.4;
}
.ha-view-btn:hover {
    background: #333;
    color: #ccc;
}

/* ---------- Link Block (forces new line) ---------- */
.ha-link-block {
    display: block;
    margin-top: 4px;
}

/* Link capsule – contains the link and copy button */
.ha-link-capsule {
    display: inline-flex;
    align-items: center;
    background: #1c1c1c;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 1px 10px;
    max-width: 100%;
    overflow: hidden;
    gap: 6px;
}

.ha-link-capsule .ha-link-text {
    color: #82b1ff;
    text-decoration: none !important;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}
.ha-link-capsule .ha-link-text:hover {
    color: #90caf9;
}

.ha-link-capsule .ha-copy-btn {
    background: #2a2a2a;
    border: none;
    color: #999;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 10px;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
}
.ha-link-capsule .ha-copy-btn:hover {
    background: #444;
    color: #ccc;
}

/* ---------- Right Block ---------- */
.ha-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

/* Status Capsule (dimmed) */
.ha-status {
    display: inline-block;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #ddd;
}
.ha-status.processing { background: #1a3a5c; border-color: #2a4a6c; color: #b8d4f0; }
.ha-status.completed  { background: #1b3a1b; border-color: #2b4a2b; color: #b8e0b8; }
.ha-status.canceled   { background: #4a1a1a; border-color: #5a2a2a; color: #f0b8b8; }
.ha-status.refunded   { background: #4a3510; border-color: #5a4520; color: #f0d9b8; }

/* Status Dropdown (admin) */
.ha-status-select select {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 600;
    color: #ddd;
    cursor: pointer;
    transition: 0.2s;
}
.ha-status-select.processing select { background: #1a3a5c; border-color: #2a4a6c; color: #b8d4f0; }
.ha-status-select.completed  select { background: #1b3a1b; border-color: #2b4a2b; color: #b8e0b8; }
.ha-status-select.canceled   select { background: #4a1a1a; border-color: #5a2a2a; color: #f0b8b8; }
.ha-status-select.refunded   select { background: #4a3510; border-color: #5a4520; color: #f0d9b8; }

/* Amount */
.ha-amount {
    display: inline-block;
    background: #1c1c1c;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 13px;
    font-weight: 700;
    color: #4caf50;
}

/* ---------- Comments Modal – restyled ---------- */
.ha-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.ha-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.ha-modal-box {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 16px;
    max-width: 90%;
    width: 400px;
    color: #ccc;
    max-height: 70vh;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Close button – centered at top, perfect circle */
.ha-modal-close {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}
.ha-modal-close button {
    width: 28px;
    height: 28px;
    padding: 0;
    background: #ffcdd2;
    border: none;
    border-radius: 50%;
    color: #b71c1c;
    font-size: 18px;
    line-height: 28px;          /* vertical centering */
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ha-modal-close button:hover {
    background: #ef9a9a;
}

/* Comments list – smaller font */
.ha-comment-list {
    white-space: pre-line;
    font-size: 12px;
    line-height: 1.5;
    color: #ddd;
    margin-top: 8px;
}