/* ============================================
   Domain Checker Pro — WooCommerce-native UI
   Brand color: #0077bb (sbuy.io.vn)
   ============================================ */

/* ── Scoped tokens ── */
.dc-wrap {
    --dc-primary:   #0077bb;        /* brand chính */
    --dc-primary-d: #005f96;        /* hover / dark */
    --dc-primary-l: #e6f4fb;        /* bg nhạt */
    --dc-primary-xl:#f0f8fd;        /* bg rất nhạt */
    --dc-success:   #0f834d;
    --dc-danger:    #cd2f2f;
    --dc-ai:        #0077bb;        /* AI badge dùng cùng brand */
    --dc-border:    #c8dfe9;        /* border tông xanh nhạt */
    --dc-text:      #1a2e38;        /* text đậm có tông xanh */
    --dc-muted:     #5a7a8a;        /* muted có tông xanh */
    --dc-bg:        #f4f9fc;        /* nền tổng thể */
    --dc-card:      #ffffff;
    --dc-radius:    4px;
    --dc-shadow:    0 1px 6px rgba(0,119,187,.12);
    --dc-font:      inherit;
}

/* ── Layout wrapper ── */
.dc-wrap {
    font-family: var(--dc-font);
    color: var(--dc-text);
    margin: 0 0 2em;
}

/* ══════════════════════════════════════════
   SEARCH PANEL  — looks like a WC widget box
   ══════════════════════════════════════════ */
.dc-search-panel {
    background: var(--dc-card);
    border: 1px solid var(--dc-border);
    border-top: 3px solid var(--dc-primary);
    padding: 28px 24px 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,119,187,.07);
}
.dc-search-panel-title {
    font-size: 1.15em;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--dc-text);
}
.dc-search-panel-sub {
    color: var(--dc-muted);
    font-size: .9em;
    margin: 0 0 18px;
}

/* Search row — mirrors WC coupon row */
.dc-search-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.dc-search-row input[type="text"] {
    flex: 1;
    min-width: 200px;
    /* WC form-row input styles */
    border: 1px solid var(--dc-border);
    border-radius: var(--dc-radius);
    padding: .6473em 1em;
    font-size: 1em;
    color: var(--dc-text);
    background: var(--dc-card);
    outline: none;
    transition: border-color .15s;
    box-shadow: none;
    -webkit-appearance: none;
}
.dc-search-row input[type="text"]:focus {
    border-color: var(--dc-primary);
    box-shadow: 0 0 0 3px rgba(0,119,187,.15);
}
.dc-search-row input[type="text"]::placeholder { color: #aaa; }

/* ── Buttons: extend WC .button class visually ── */
.dc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border: 0;
    font-size: 1em;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--dc-radius);
    padding: .6473em 1.41575em;
    text-decoration: none;
    transition: background .15s, opacity .15s;
    white-space: nowrap;
    line-height: 1.41575;
}
.dc-btn:disabled { opacity: .55; cursor: default; }

.dc-btn-primary {
    background-color: var(--dc-primary);
    color: #fff;
}
.dc-btn-primary:hover:not(:disabled) {
    background-color: var(--dc-primary-d);
    color: #fff;
}

.dc-btn-success {
    background-color: var(--dc-success);
    color: #fff;
    font-size: .85em;
    padding: .5em 1.1em;
}
.dc-btn-success:hover:not(:disabled) { opacity: .88; color: #fff; }

.dc-btn-ghost {
    background: transparent;
    color: var(--dc-primary);
    border: 1px solid var(--dc-primary);
    font-size: .85em;
    padding: .48em 1em;
}
.dc-btn-ghost:hover:not(:disabled) {
    background: var(--dc-primary);
    color: #fff;
}

.dc-btn-ai {
    background-color: var(--dc-ai);
    color: #fff;
}
.dc-btn-ai:hover:not(:disabled) { opacity: .88; color: #fff; }

/* ══════════════════════════════════════════
   TABS — WC account-navigation style
   ══════════════════════════════════════════ */
.dc-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--dc-border);
    margin-bottom: 20px;
    overflow-x: auto;
}
.dc-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    padding: 10px 18px;
    font-size: .9em;
    font-weight: 600;
    font-family: inherit;
    color: var(--dc-muted);
    white-space: nowrap;
    transition: color .15s, border-color .15s;
}
.dc-tab:hover  { color: var(--dc-primary); }
.dc-tab.active {
    color: var(--dc-primary);
    border-bottom-color: var(--dc-primary);
    background: transparent;
}

.dc-tab-content          { display: none; }
.dc-tab-content.active   { display: block; }

/* ══════════════════════════════════════════
   RESULT CARDS — WC order-item table rows
   ══════════════════════════════════════════ */
.dc-results-area { display: flex; flex-direction: column; gap: 6px; }

.dc-result-card {
    background: var(--dc-card);
    border: 1px solid var(--dc-border);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    transition: border-color .15s, box-shadow .15s;
}
.dc-result-card:hover { border-color: #b0a8b5; box-shadow: var(--dc-shadow); }

/* Left accent stripe (like WC order-status pills) */
.dc-result-card.available  { border-left: 3px solid var(--dc-success); }
.dc-result-card.registered { border-left: 3px solid var(--dc-danger); }
.dc-result-card.loading    { border-left: 3px solid var(--dc-border); opacity: .75; }

.dc-result-icon {
    font-size: 1.35em;
    line-height: 1;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.dc-result-info  { flex: 1; min-width: 0; }
.dc-result-domain {
    font-size: 1em;
    font-weight: 700;
    color: var(--dc-text);
    word-break: break-all;
}
.dc-result-meta {
    font-size: .8em;
    color: var(--dc-muted);
    margin-top: 2px;
}

/* Price — mirrors WC .price */
.dc-result-price {
    font-size: 1.05em;
    font-weight: 700;
    color: var(--dc-success);
    white-space: nowrap;
    margin: 0 8px;
}
.dc-result-price small { font-size: .65em; font-weight: 500; color: var(--dc-muted); }

.dc-result-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* ══════════════════════════════════════════
   SECTION LABELS — like WC order table headers
   ══════════════════════════════════════════ */
.dc-section-label {
    font-size: .75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--dc-muted);
    padding: 12px 0 6px;
    border-bottom: 1px solid var(--dc-border);
    margin-bottom: 4px;
}

/* ══════════════════════════════════════════
   BULK TEXTAREA
   ══════════════════════════════════════════ */
.dc-bulk-area { margin-bottom: 16px; }
.dc-bulk-area textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--dc-border);
    border-radius: var(--dc-radius);
    padding: .65em 1em;
    font-size: .9em;
    font-family: monospace;
    color: var(--dc-text);
    background: var(--dc-card);
    resize: vertical;
    outline: none;
    transition: border-color .15s;
}
.dc-bulk-area textarea:focus { border-color: var(--dc-primary); }
.dc-bulk-area .dc-btn { margin-top: 10px; }

/* ══════════════════════════════════════════
   AI PANEL — WC notice style
   ══════════════════════════════════════════ */
.dc-ai-panel {
    background: var(--dc-primary-xl);
    border: 1px solid var(--dc-border);
    border-left: 3px solid var(--dc-primary);
    padding: 20px;
    margin-bottom: 16px;
}
.dc-ai-badge {
    display: inline-block;
    background: var(--dc-ai);
    color: #fff;
    border-radius: 2px;
    padding: 2px 10px;
    font-size: .75em;
    font-weight: 700;
    letter-spacing: .04em;
    margin-bottom: 10px;
}
.dc-ai-panel p {
    color: var(--dc-muted);
    font-size: .88em;
    margin: 0 0 14px;
}
.dc-ai-fields { display: flex; flex-direction: column; gap: 8px; }
.dc-ai-fields input[type="text"] {
    border: 1px solid var(--dc-border);
    border-radius: var(--dc-radius);
    padding: .6em 1em;
    font-size: .95em;
    font-family: inherit;
    color: var(--dc-text);
    background: #fff;
    outline: none;
    transition: border-color .15s;
}
.dc-ai-fields input[type="text"]:focus { border-color: var(--dc-primary); box-shadow: 0 0 0 3px rgba(0,119,187,.12); }

/* ══════════════════════════════════════════
   WHOIS MODAL — WC lightbox / popup style
   ══════════════════════════════════════════ */
.dc-modal {
    position: fixed;
    inset: 0;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dc-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
}
.dc-modal-box {
    background: #fff;
    border: 1px solid var(--dc-border);
    width: min(620px, 96vw);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 40px rgba(0,0,0,.25);
    border-radius: var(--dc-radius);
}
.dc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--dc-border);
    background: var(--dc-bg);
}
.dc-modal-header h3 {
    margin: 0;
    font-size: 1em;
    font-weight: 700;
    color: var(--dc-text);
}
.dc-modal-close {
    background: none;
    border: 1px solid var(--dc-border);
    border-radius: var(--dc-radius);
    cursor: pointer;
    color: var(--dc-muted);
    font-size: 1em;
    line-height: 1;
    padding: 4px 9px;
    font-family: inherit;
    transition: background .12s;
}
.dc-modal-close:hover { background: #eee; }
.dc-modal-body { padding: 20px; overflow-y: auto; }

/* WHOIS table — WC order-details table */
.dc-whois-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88em;
}
.dc-whois-table tr { border-bottom: 1px solid var(--dc-border); }
.dc-whois-table tr:last-child { border-bottom: none; }
.dc-whois-table td { padding: 9px 8px; vertical-align: top; }
.dc-whois-table td:first-child {
    color: var(--dc-muted);
    font-weight: 600;
    width: 38%;
    white-space: nowrap;
}
.dc-whois-table td:last-child { color: var(--dc-text); word-break: break-all; }

.dc-status-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.dc-status-chip {
    display: inline-block;
    font-size: .72em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 2px 8px;
    border-radius: 2px;
    background: var(--dc-primary-l);
    color: var(--dc-primary);
}

/* ══════════════════════════════════════════
   SKELETON / LOADING
   ══════════════════════════════════════════ */
.dc-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--dc-border);
    border-top-color: var(--dc-primary);
    border-radius: 50%;
    animation: dc-spin .65s linear infinite;
    margin: 28px auto;
}
@keyframes dc-spin { to { transform: rotate(360deg); } }

.dc-skeleton {
    background: linear-gradient(90deg, #deeef7 25%, #c8e2f0 50%, #deeef7 75%);
    background-size: 200% 100%;
    animation: dc-shimmer 1.3s infinite;
    border-radius: 2px;
    height: 13px;
}
@keyframes dc-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ══════════════════════════════════════════
   TOAST — WC woocommerce-message style
   ══════════════════════════════════════════ */
.dc-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    background: #fff;
    border: 1px solid var(--dc-border);
    border-left: 4px solid var(--dc-primary);
    padding: 14px 20px;
    font-size: .9em;
    color: var(--dc-text);
    max-width: 360px;
    box-shadow: 0 4px 20px rgba(0,119,187,.18);
    border-radius: var(--dc-radius);
    animation: dc-toast-in .25s ease;
}
.dc-toast.success { border-left-color: var(--dc-success); }
.dc-toast.error   { border-left-color: var(--dc-danger); }
.dc-toast a       { color: var(--dc-primary); font-weight: 600; }
@keyframes dc-toast-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════ */
.dc-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--dc-muted);
    font-size: .9em;
    border: 1px dashed var(--dc-border);
    background: var(--dc-primary-xl);
}
.dc-empty-icon { font-size: 2.4em; margin-bottom: 10px; }

/* ══════════════════════════════════════════
   HINT TEXT
   ══════════════════════════════════════════ */
.dc-input-hint {
    font-size: .8em;
    color: var(--dc-muted);
    margin-top: 8px;
}
.dc-input-hint em { color: var(--dc-primary); font-style: normal; font-weight: 600; }

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 600px) {
    .dc-search-panel { padding: 18px 14px; }
    .dc-search-row   { flex-direction: column; }
    .dc-search-row input[type="text"] { min-width: 0; }
    .dc-btn-primary  { width: 100%; justify-content: center; }

    .dc-tabs { gap: 0; }
    .dc-tab  { padding: 9px 12px; font-size: .82em; }

    .dc-result-card     { flex-wrap: wrap; gap: 8px; }
    .dc-result-price    { margin: 0; }
    .dc-result-actions  { width: 100%; }
    .dc-result-actions .dc-btn { flex: 1; justify-content: center; }

    .dc-toast { left: 12px; right: 12px; bottom: 16px; max-width: none; }
}

/* ══════════════════════════════════════════
   WHOIS INLINE EXPAND
   ══════════════════════════════════════════ */
.dc-whois-inline {
    border-top: 1px solid var(--dc-border);
    margin-top: 12px;
    padding-top: 12px;
    width: 100%;
    flex-basis: 100%;
}
.dc-result-card.registered { flex-wrap: wrap; }

.dc-whois-table { width: 100%; border-collapse: collapse; font-size: .82em; }
.dc-whois-table tr { border-bottom: 1px solid var(--dc-border); }
.dc-whois-table tr:last-child { border-bottom: none; }
.dc-wt-key {
    color: var(--dc-muted); font-weight: 600;
    padding: 7px 8px; width: 32%; white-space: nowrap; vertical-align: top;
}
.dc-wt-val { padding: 7px 8px; color: var(--dc-text); word-break: break-all; }
.dc-whois-err { color: var(--dc-danger); font-size: .85em; padding: 8px 0 0; margin: 0; }

/* Nameserver list */
.dc-ns-item {
    display: block;
    font-family: monospace;
    font-size: .88em;
    line-height: 1.7;
}

/* Unknown status card */
.dc-result-card.unknown { border-left: 3px solid var(--dc-warning, #f59e0b); }

/* Meta error text */
.dc-meta-err { color: var(--dc-danger); font-size: .88em; }

/* Warning color */
:root { --dc-warning: #f59e0b; }
