/* =====================================================================
   CANNEXX INQUIRY SYSTEM — cannexx-inquiry.css
   Place in: /wp-content/themes/hello-elementor/css/
   ===================================================================== */

/* ── BUYER INQUIRY TAB — sidebar nav ── */
.cnx-sidebar-nav a[data-tab="inquiries"] .cnx-nav-badge {
    background: #dc2626;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 20px;
    margin-left: auto;
}

/* ── INQUIRY STATUS PILLS ── */
.cnx-inq-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.cnx-inq-status.new {
    background: #fef3c7;
    color: #b45309;
}

.cnx-inq-status.viewed {
    background: #dbeafe;
    color: #1e40af;
}

.cnx-inq-status.responded {
    background: #dcfce7;
    color: #15803d;
}

.cnx-inq-status.closed {
    background: #f1f5f9;
    color: #475569;
}

/* ── INQUIRY CARD ── */
.cnx-inquiry-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cnx-inquiry-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
    transition: box-shadow .2s;
}

.cnx-inquiry-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
}

.cnx-inquiry-card.has-reply {
    border-left: 4px solid #16a34a;
}

.cnx-inq-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.cnx-inq-product-name {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #053378 !important;
    margin: 0 0 4px !important;
}

.cnx-inq-date {
    font-size: 12px;
    color: #9ca3af;
}

.cnx-inq-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

@media (max-width: 600px) {
    .cnx-inq-details-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.cnx-inq-detail-item {
    background: #f8fafc;
    border-radius: 7px;
    padding: 9px 12px;
}

.cnx-inq-detail-item .lbl {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #9ca3af;
    letter-spacing: .04em;
    margin-bottom: 3px;
}

.cnx-inq-detail-item .val {
    font-size: 14px;
    font-weight: 600;
    color: #1a202c;
}

.cnx-inq-detail-item .val.price {
    color: #16a34a;
}

/* Admin reply box shown to buyer */
.cnx-inq-reply-box {
    background: #f0fdf4;
    border: 1px solid #a7d9bc;
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 12px;
}

.cnx-inq-reply-box .reply-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #15803d;
    margin-bottom: 6px;
    display: block;
}

.cnx-inq-reply-box .reply-text {
    font-size: 14px;
    color: #1a202c;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Loading / Empty */
.cnx-inq-loading {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
    font-size: 14px;
}

.cnx-inq-empty {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.cnx-inq-empty .icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.cnx-inq-empty h4 {
    color: #374151;
    font-size: 16px;
    margin-bottom: 6px;
}

.cnx-inq-empty p {
    font-size: 13px;
}

/* ── ADMIN OFFER REPLY MODAL ── */
#cnx-offer-reply-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#cnx-offer-reply-modal.active {
    display: flex;
}

.cnx-reply-modal-box {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    animation: cnxReplyIn .2s ease;
}

@keyframes cnxReplyIn {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cnx-reply-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
}

.cnx-reply-modal-head h3 {
    margin: 0;
    font-size: 17px;
    color: #053378;
    font-weight: 700;
}

.cnx-reply-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #9ca3af;
    padding: 4px 8px;
    line-height: 1;
    border-radius: 4px;
}

.cnx-reply-modal-close:hover {
    color: #dc2626;
    background: #fee2e2;
}

.cnx-reply-modal-body {
    padding: 20px 24px 24px;
}

/* Product summary in reply modal */
.cnx-reply-product-summary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.cnx-reply-product-summary h4 {
    margin: 0 0 10px;
    font-size: 15px;
    color: #053378;
    font-weight: 700;
}

.cnx-reply-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 13px;
}

.cnx-reply-summary-grid .row {
    display: flex;
    gap: 6px;
}

.cnx-reply-summary-grid .row .lbl {
    color: #9ca3af;
    font-weight: 600;
    white-space: nowrap;
}

.cnx-reply-summary-grid .row .val {
    color: #1a202c;
    font-weight: 500;
}

/* Reply form fields */
.cnx-reply-field {
    margin-bottom: 16px;
}

.cnx-reply-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.cnx-reply-field input[type="text"],
.cnx-reply-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1a202c;
    font-family: Inter, sans-serif;
    background: #fff;
    outline: none;
    transition: border-color .15s;
    box-sizing: border-box;
}

.cnx-reply-field input:focus,
.cnx-reply-field textarea:focus {
    border-color: #053378;
    box-shadow: 0 0 0 3px rgba(5, 51, 120, .1);
}

.cnx-reply-field textarea {
    min-height: 130px;
    resize: vertical;
    line-height: 1.6;
}

.cnx-reply-send-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #053378;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
    font-family: Inter, sans-serif;
}

.cnx-reply-send-btn:hover {
    background: #1e3a78;
}

.cnx-reply-send-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.cnx-reply-cancel-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 20px;
    background: transparent;
    color: #6b7280;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    font-family: Inter, sans-serif;
}

.cnx-reply-cancel-btn:hover {
    border-color: #374151;
    color: #1a202c;
}

.cnx-reply-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.cnx-reply-success {
    display: none;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #15803d;
    padding: 10px 14px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 10px;
}

.cnx-reply-error {
    display: none;
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 10px;
}

/* Send Mail button in offers table */
.cnx-send-mail-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1.5px solid #bfdbfe;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
    width: 100%;
    justify-content: center;
    font-family: 'Segoe UI', sans-serif;
}

.cnx-send-mail-btn:hover {
    background: #1d4ed8;
    color: #fff;
    border-color: #1d4ed8;
}

/* Responded badge */
.cnx-responded-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #dcfce7;
    color: #15803d;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}