/* ==========================
   AIHUB TAX LOOKUP – LAYOUT
   ========================== */

.aixh-mst-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    color: #111827;
}

/* Reset trong vùng widget để Flatsome không phá layout */
.aixh-mst-widget *,
.aixh-mst-widget *::before,
.aixh-mst-widget *::after {
    box-sizing: border-box;
}

.aixh-mst-widget p {
    margin: 0;
}

/* ===== Search box ===== */

.aixh-mst-search-box {
    margin-bottom: 30px;
}

.aixh-mst-form {
    display: flex;
    align-items: stretch;
    gap: 16px;
    margin: 0;
}

.aixh-mst-input-wrap {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 10px;
    padding: 0 18px;
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
    position: relative;
}

.aixh-mst-input-wrap:focus-within {
    border-color: #1a73ff;
    box-shadow: 0 12px 36px rgba(26, 115, 255, 0.20);
    transform: translateY(-1px);
}

.aixh-mst-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    flex-shrink: 0;
    position: relative;
}

/* icon search dạng vòng tròn + kính lúp */
.aixh-mst-icon::before,
.aixh-mst-icon::after {
    content: "";
    position: absolute;
    display: block;
}

.aixh-mst-icon::before {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 2px solid #9ca3af;
    top: 3px;
    left: 2px;
}

.aixh-mst-icon::after {
    width: 9px;
    height: 2px;
    border-radius: 999px;
    background: #9ca3af;
    transform: rotate(45deg);
    bottom: 1px;
    right: -1px;
}

.aixh-mst-input {
    border: none !important;
    outline: none !important;
    background: transparent !important;
    width: 100%;
    height: 56px;
    line-height: 56px;
    font-size: 16px;
    color: #111827;
    padding: 0;
    box-shadow: none !important;
    margin-bottom: 1px !important;
}

.aixh-mst-input::placeholder {
    color: #9ca3af;
}

/* ===== Button ===== */

.aixh-mst-button {
    flex: 0 0 auto;
    border: none;
    outline: none;
    cursor: pointer;
    height: 56px;
    padding: 0 28px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1a73ff, #0f5adb);
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
    white-space: nowrap;
    margin-bottom: 1px !important;
}

.aixh-mst-button:hover {
    transform: translateY(-1px);
}

.aixh-mst-button:active {
    transform: translateY(0);
    box-shadow: 0 10px 24px rgba(26, 115, 255, 0.40);
}

.aixh-mst-button[disabled] {
    cursor: default;
    opacity: 0.75;
    box-shadow: none;
}

.aixh-mst-button-label {
    position: relative;
    z-index: 2;
}

/* Spinner loading trong nút */
.aixh-mst-button-spinner {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: #ffffff;
    animation: aixh-spin 0.7s linear infinite;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.12s ease, transform 0.12s ease;
}

.aixh-mst-button.aixh-is-loading .aixh-mst-button-label {
    opacity: 0;
}

.aixh-mst-button.aixh-is-loading .aixh-mst-button-spinner {
    opacity: 1;
    transform: scale(1);
}

/* Hint nhỏ dưới ô search */
.aixh-mst-hint {
    margin-top: 8px;
    font-size: 13px;
    color: #6b7280;
}

.aixh-mst-hint span {
    font-weight: 500;
    color: #111827;
}

/* ===== Result area ===== */

.aixh-mst-result {
    margin-top: 12px;
}

/* Card khi tìm thấy */
.aixh-mst-card {
    background: #ffffff;
    border-radius: 18px;
    border: 2px solid #105ddf;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    padding: 24px 28px;
}

.aixh-mst-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.aixh-mst-company-name {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.aixh-mst-status {
    padding: 6px 12px;
    border-radius: 999px;
    background: #ecfdf3;
    color: #166534;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
}

.aixh-mst-status-icon {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 2px solid #22c55e;
    position: relative;
    box-sizing: border-box;
}

.aixh-mst-status-icon::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 1px;
    width: 5px;
    height: 8px;
    border: 2px solid #22c55e;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.aixh-mst-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 40px;
}


/* Hàng thông tin có icon */
.aixh-mst-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.aixh-mst-item-icon {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #eff6ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 15px;
    margin-top: 2px;
}

.aixh-mst-item-icon i {
    line-height: 1;
}

.aixh-mst-item-text {
    flex: 1 1 auto;
}

/* chỉnh lại khoảng cách cột một chút cho thoáng */
.aixh-mst-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 56px;
}


.aixh-mst-meta-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.aixh-mst-row-label {
    font-size: 15px;
    color: #000000;
    margin-bottom: 2px;
}

.aixh-mst-row-value {
    font-size: 17px;
    color: #111827;
    font-weight: 500;
}

.aixh-mst-source {
    margin-top: 18px;
    font-size: 12px;
    color: #9ca3af;
}

/* Trạng thái / message đơn giản */
.aixh-mst-message {
    padding: 16px 18px;
    border-radius: 14px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 14px;
}

.aixh-mst-message--error {
    background: #fef2f2;
    color: #b91c1c;
}

/* Card khi không tìm thấy */
.aixh-mst-empty {
    background: #f9fafb;
    border-radius: 18px;
    border: 1px dashed #d1d5db;
    padding: 32px 24px;
    text-align: center;
    color: #6b7280;
}

.aixh-mst-empty-icon {
    width: 54px;
    height: 54px;
    border-radius: 999px;
    border: 2px solid #e5e7eb;
    margin: 0 auto 12px;
    position: relative;
}

.aixh-mst-empty-icon::before,
.aixh-mst-empty-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 999px;
}

.aixh-mst-empty-icon::before {
    top: 13px;
    width: 4px;
    height: 16px;
    background: #9ca3af;
}

.aixh-mst-empty-icon::after {
    bottom: 10px;
    width: 6px;
    height: 6px;
    background: #9ca3af;
}

.aixh-mst-empty-title {
    font-size: 16px;
    font-weight: 500;
    color: #111827;
    margin-bottom: 4px;
}

.aixh-mst-empty-text {
    font-size: 14px;
    color: #6b7280;
}

/* ===== Animations ===== */

@keyframes aixh-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Responsive (Mobile) ===== */

@media (max-width: 767px) {
    .aixh-mst-form {
        flex-direction: column;
        gap: 10px;
    }

    .aixh-mst-input-wrap {
        padding: 0 14px;
    }

    .aixh-mst-input {
        height: 50px;
        line-height: 50px;
        font-size: 15px;
    }

    .aixh-mst-button {
        width: 100%;
        justify-content: center;
        height: 50px;
        padding: 0 20px;
    }

    .aixh-mst-card-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .aixh-mst-meta {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}



/* Ẩn khối lead khi chưa có kết quả */
.aixh-lead--hidden {
    display: none;
}

/* Khối form nhận báo cáo (CF7) */
.aixh-lead-block {
    margin-top: 32px;
    padding: 24px 28px;
    border: 1px solid #d5d5d5;
    border-radius: 16px;
    background: #f4f7ff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
}

.aixh-lead-head {
    margin-bottom: 20px;
}

.aixh-lead-title {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.aixh-lead-sub {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

/* Lưới 3 ô input */
.aixh-lead-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
    margin-bottom: 12px;
}

.aixh-lead-field {
    flex: 1 1 0;
    min-width: 180px;
}

/* Style input CF7 trong block */
.aixh-lead-field .wpcf7-form-control {
    width: 100%;
    border-radius: 9px;
    height: 52px;
    border: 1px solid #dde3f0;
    padding: 10px 16px;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: none;
    margin-bottom: 8px;
}

/* Nút submit */
.aixh-lead-actions {
    margin-top: 8px;
}

.aixh-lead-actions .wpcf7-submit {
    width: 100%;
    text-transform: unset;
    border-radius: 9px;
    border: none;
    padding: 8px 20px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    background: #1d72ff;
    color: #fff;
    transition: filter 0.15s ease, transform 0.15s ease;
}

.aixh-lead-actions .wpcf7-submit:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

/* Responsive mobile */
@media (max-width: 767px) {
    .aixh-lead-block {
        padding: 20px 18px;
    }

    .aixh-lead-title {
        font-size: 18px;
    }

    .aixh-lead-grid {
        flex-direction: column;
    }
}
