/* ── Certificate Verify – Public Styles ─────────────────────────── */

.mbws-wrap {
    max-width: 860px;
    margin: 0 auto;
    font-family: inherit;
}

/* Header */
.mbws-header h2 {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #1a1a1a;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid #2ecc71;
}

/* Search box */
.mbws-search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

input.mbws-input {
    flex: 1;
    padding: 0 16px;
    height: 40px !important;
    min-height: 40px !important;
    font-size: 1rem;
    border: 2px solid #ccc;
    margin-bottom: unset !important;
    border-radius: 4px !important;
    outline: none;
    transition: border-color .2s;
}

.mbws-input:focus {
    border-color: #27ae60;
}

.mbws-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 24px;
    margin: unset !important;
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: .03em;
    transition: background .2s;
    white-space: nowrap;
    line-height: 1;
}

.mbws-btn:hover {
    background: #1e8449;
}

.mbws-btn:disabled {
    opacity: .6;
    cursor: default;
}

/* Spinner Animation */
@keyframes mbws-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.mbws-spin {
    animation: mbws-spin 1s linear infinite;
    display: inline-block;
}

/* Result area */
.mbws-result {
    margin-top: 10px;
}

.mbws-not-found {
    text-align: center;
    color: #7f8c8d;
    font-size: 1rem;
    padding: 20px;
}

/* Card */
.mbws-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}

.mbws-card__title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
    padding: 12px 16px;
    background: #f4f6f7;
    border-bottom: 1px solid #ddd;
    color: #2c3e50;
}

/* Table */
.mbws-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .93rem;
}

.mbws-table th,
.mbws-table td {
    padding: 10px 16px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
    text-align: left;
}

.mbws-table td:first-child,
.mbws-table th:first-child {
    padding-left: 16px;
}

.mbws-table td:last-child,
.mbws-table th:last-child {
    padding-right: 16px;
}

.mbws-table th {
    width: 38%;
    color: #555;
    font-weight: 600;
    background: #fafafa;
}

.mbws-table td {
    color: #222;
}

.mbws-table tr:last-child th,
.mbws-table tr:last-child td {
    border-bottom: none;
}

/* Badge hiệu lực */
.mbws-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 3px;
    font-weight: 700;
    font-size: .85rem;
    letter-spacing: .03em;
}

.mbws-badge--valid {
    background: #d5f5e3;
    color: #1a7a40;
}

.mbws-badge--expired {
    background: #fadbd8;
    color: #922b21;
}

/* Card footer */
.mbws-card__footer {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.mbws-link-detail {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #2980b9;
    font-size: .9rem;
    text-decoration: none;
    line-height: 1;
}

.mbws-link-detail:hover {
    text-decoration: underline;
}

.mbws-btn--qr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    padding: 0 16px;
    font-size: .85rem;
    font-weight: 600;
    background: #2980b9;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    line-height: 1;
}

.mbws-btn--qr:hover {
    background: #1c6490;
}

.mbws-btn--copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    padding: 0 16px;
    margin: unset !important;
    font-size: .85rem;
    font-weight: 600;
    background: transparent;
    color: #2980b9;
    border: 1px solid #2980b9;
    border-radius: 4px;
    cursor: pointer;
    line-height: 1;
    transition: all .2s;
}

.mbws-btn--copy:hover {
    background: #2980b9;
    color: #fff;
}

.mbws-link-detail .dashicons,
.mbws-btn--qr .dashicons,
.mbws-btn--copy .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

/* QR output */
.mbws-qr-result {
    padding: 16px;
    text-align: center;
    background: #fff;
    border-top: 1px solid #eee;
}

.mbws-qr-result canvas,
.mbws-qr-result img {
    margin: 0 auto;
}

.mbws-qr-result .mbws-qr-url {
    margin-top: 8px;
    font-size: .8rem;
    color: #666;
    word-break: break-all;
}

.mbws-qr-result .mbws-qr-download {
    display: inline-block;
    margin-top: 8px;
    font-size: .85rem;
    color: #27ae60;
    text-decoration: underline;
    cursor: pointer;
}

/* Back link */
.mbws-back-link {
    color: #555;
    font-size: .9rem;
    text-decoration: none;
}

.mbws-back-link:hover {
    color: #222;
}

/* Responsive */
@media (max-width: 600px) {
    .mbws-search-box {
        flex-direction: column;
    }

    .mbws-btn {
        width: 100%;
    }

    .mbws-table th {
        width: 45%;
    }

    .mbws-card__footer {
        flex-direction: column;
    }
}