/* =====================================================
   MHB Dashboard + Messaging + Pay
   ===================================================== */

/* ── Shared wrap ─────────────────────────────────────── */
.mhb-dash-wrap,
.mhb-msg-wrap {
    max-width: 920px;
    margin: 0 auto;
    padding: 32px 16px 60px;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #1a1a1a;
}

/* ── Dashboard header ────────────────────────────────── */
.mhb-dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}
.mhb-dash-header h2 {
    margin: 0 0 4px;
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
}
.mhb-dash-header p {
    margin: 0;
    font-size: 14px;
    color: #888;
}
.mhb-dash-logout {
    font-size: 13px;
    color: #888;
    text-decoration: none;
    border: 1px solid #e0e0e0;
    padding: 7px 16px;
    border-radius: 6px;
    transition: all 0.2s;
}
.mhb-dash-logout:hover {
    background: #fef2f2;
    color: #ef4444;
    border-color: #fecaca;
}

/* ── Empty state ─────────────────────────────────────── */
.mhb-dash-empty {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border: 1px solid #e4eeee;
    border-radius: 10px;
}
.mhb-dash-empty svg { margin-bottom: 16px; display: block; margin-left: auto; margin-right: auto; }
.mhb-dash-empty h3 { margin: 0 0 8px; font-size: 18px; color: #1a1a1a; }
.mhb-dash-empty p  { margin: 0 0 20px; color: #888; font-size: 14px; }

/* ── Booking cards ───────────────────────────────────── */
.mhb-dash-bookings {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mhb-dash-booking-card {
    background: #fff;
    border: 1px solid #e4eeee;
    border-radius: 10px;
    padding: 22px 24px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
}
.mhb-dash-booking-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.mhb-dash-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}
.mhb-dash-hotel-info h3 {
    margin: 0 0 5px;
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
}
.mhb-dash-dates {
    margin: 0;
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.mhb-dash-nights {
    background: #f2f6f6;
    color: #148992;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}
.mhb-dash-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}
.mhb-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.mhb-dash-price {
    font-size: 18px;
    font-weight: 700;
    color: #148992;
}

.mhb-dash-card-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #aaa;
    margin-bottom: 14px;
    padding-top: 10px;
    border-top: 1px solid #f4f4f4;
}

.mhb-dash-notes {
    font-size: 13px;
    color: #666;
    background: #f9fafa;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 12px;
}

/* ── Card actions ────────────────────────────────────── */
.mhb-dash-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid #f4f4f4;
}

.mhb-dash-btn-primary,
.mhb-dash-btn-msg,
.mhb-dash-btn-pay,
.mhb-dash-btn-invoice,
.mhb-dash-btn-cancel {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: opacity 0.2s, background 0.2s;
}
.mhb-dash-btn-primary  { background: #148992; color: #fff; }
.mhb-dash-btn-msg      { background: #f0f9fa; color: #148992; border: 1px solid #cce8e9; }
.mhb-dash-btn-pay      { background: #148992; color: #fff; }
.mhb-dash-btn-invoice  { background: #f4f6f5; color: #555; border: 1px solid #e0e0e0; }
.mhb-dash-btn-cancel   { background: #fef2f2; color: #ef4444; border: 1px solid #fecaca; }
.mhb-dash-btn-primary:hover,
.mhb-dash-btn-pay:hover  { opacity: 0.88; color: #fff; }
.mhb-dash-btn-msg:hover  { background: #e6f4f5; }
.mhb-dash-btn-cancel:hover { background: #fee2e2; }

.mhb-unread-badge {
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 2px;
}

/* ── Pay modal ───────────────────────────────────────── */
.mhb-pay-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}
.mhb-pay-card {
    background: #fff;
    border-radius: 12px;
    padding: 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 16px 60px rgba(0,0,0,0.20);
}
.mhb-pay-card h3 {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}
.mhb-pay-breakdown {
    background: #f7fafa;
    border: 1px solid #e4eeee;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
}
.mhb-pay-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #555;
    padding: 6px 0;
    border-bottom: 1px solid #eef2f2;
}
.mhb-pay-row:last-child { border-bottom: none; }
.mhb-pay-total {
    font-size: 16px;
    font-weight: 700;
    color: #148992;
    padding-top: 10px;
    margin-top: 4px;
}
.mhb-stripe-element {
    border: 1.5px solid #e2e8f0;
    border-radius: 7px;
    padding: 13px 14px;
    background: #fafafa;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}
.mhb-stripe-element.StripeElement--focus { border-color: #148992; }
.mhb-stripe-errors {
    color: #ef4444;
    font-size: 13px;
    margin-bottom: 12px;
    min-height: 18px;
}

/* ── Messaging page ──────────────────────────────────── */
.mhb-msg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.mhb-msg-back {
    font-size: 13px;
    color: #148992;
    text-decoration: none;
    font-weight: 600;
}
.mhb-msg-back:hover { text-decoration: underline; }
.mhb-msg-booking-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.mhb-msg-booking-info strong { font-size: 14px; color: #1a1a1a; }
.mhb-msg-booking-info span   { font-size: 12px; color: #aaa; }

.mhb-msg-thread {
    background: #f7fafa;
    border: 1px solid #e4eeee;
    border-radius: 10px 10px 0 0;
    padding: 20px;
    min-height: 360px;
    max-height: 460px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.mhb-msg-empty {
    text-align: center;
    color: #bbb;
    font-size: 13px;
    margin: auto;
    padding: 40px 0;
}

.mhb-msg-bubble {
    max-width: 72%;
    padding: 11px 16px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.55;
    word-break: break-word;
}
.mhb-msg-bubble.mine {
    align-self: flex-end;
    background: #148992;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.mhb-msg-bubble.theirs {
    align-self: flex-start;
    background: #fff;
    color: #1a1a1a;
    border: 1px solid #e4eeee;
    border-bottom-left-radius: 4px;
}
.mhb-msg-meta {
    font-size: 10px;
    margin-bottom: 5px;
    opacity: 0.65;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.mhb-msg-text { white-space: pre-wrap; }
.mhb-msg-file {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.25);
}
.mhb-msg-bubble.theirs .mhb-msg-file { border-color: #eee; }
.mhb-msg-file a {
    font-size: 12px;
    font-weight: 600;
    color: inherit;
    text-decoration: underline;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    opacity: 0.9;
}
.mhb-msg-file a:hover { opacity: 1; }

.mhb-msg-compose {
    background: #fff;
    border: 1px solid #e4eeee;
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 16px 20px;
}
.mhb-msg-input-row textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 7px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    color: #1a1a1a;
    transition: border-color 0.2s;
}
.mhb-msg-input-row textarea:focus {
    outline: none;
    border-color: #148992;
    box-shadow: 0 0 0 3px rgba(20,137,146,0.10);
}
.mhb-msg-footer-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.mhb-msg-attach-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    padding: 7px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    transition: background 0.2s;
}
.mhb-msg-attach-label:hover { background: #f4f6f5; color: #148992; border-color: #cce8e9; }
.mhb-file-name { font-size: 12px; color: #148992; flex: 1; word-break: break-all; }
.mhb-msg-send-btn {
    margin-left: auto;
    padding: 9px 24px;
    background: #148992;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}
.mhb-msg-send-btn:hover   { background: #0f6b71; }
.mhb-msg-send-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.mhb-msg-feedback {
    margin-top: 10px;
    padding: 9px 14px;
    border-radius: 6px;
    font-size: 13px;
}
.mhb-msg-feedback.error {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fecaca;
}

.mhb-msg-no-booking {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 14px;
}

@media (max-width: 600px) {
    .mhb-msg-bubble { max-width: 88%; }
    .mhb-pay-card { padding: 24px 20px; }
    .mhb-dash-card-top { flex-direction: column; }
    .mhb-dash-card-right { align-items: flex-start; }
}
