/* ──────────────────────────────────────────────
   WC Invoice & Receipt – Checkout Styles
   ────────────────────────────────────────────── */

/* Document type toggle */
.wcir-document-type-wrapper {
    margin-bottom: 24px;
}

.wcir-document-type-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.wcir-toggle-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.wcir-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 8px 20px;
    border: 2px solid #ccc;
    border-radius: 4px;
    background: #fff;
    font-size: 0.95rem;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
    user-select: none;
}

.wcir-toggle-btn input[type="radio"] {
    display: none;
}

.wcir-toggle-btn.active,
.wcir-toggle-btn:hover {
    border-color: #0073aa;
    background: #0073aa;
    color: #fff;
}

/* Invoice section */
.wcir-invoice-fields {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 16px 20px;
    margin-bottom: 24px;
    background: #fafafa;
}

.wcir-invoice-fields-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #444;
}

/* AFM row with inline lookup button */
.wcir-afm-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.wcir-afm-wrapper .input-text {
    flex: 1;
}

.wcir-lookup-btn {
    flex-shrink: 0;
    padding: 0 14px;
    height: 40px;
    border: 1px solid #0073aa;
    border-radius: 4px;
    background: #0073aa;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s;
    line-height: 40px;
}

.wcir-lookup-btn:hover {
    background: #005a87;
}

.wcir-lookup-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Lookup messages */
.wcir-lookup-message {
    display: block;
    font-size: 0.85rem;
    margin-top: 4px;
    min-height: 1.2em;
}

.wcir-msg-success {
    color: #2e7d32;
}

.wcir-msg-error {
    color: #c62828;
}

/* Order details on front-end */
.wcir-order-invoice-info {
    margin-top: 24px;
}

.wcir-order-invoice-info table {
    width: 100%;
    border-collapse: collapse;
}

.wcir-order-invoice-info th,
.wcir-order-invoice-info td {
    padding: 6px 10px;
    border: 1px solid #eee;
    text-align: left;
}

.wcir-order-invoice-info th {
    background: #f5f5f5;
    width: 35%;
}
