/* ============================================================
   Domínio Checker for WooCommerce — Public Styles v1.6.0
   Author: António Oliveira / Portal PME
   ============================================================ */

.dc-wrapper {
    max-width: 860px;
    margin: 0 auto;
    font-family: inherit;
    color: inherit;
    box-sizing: border-box;
}

.dc-title {
    text-align: center;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
}

/* ----- Search form ----- */
.dc-form { width: 100%; }

.dc-input-group {
    display: flex;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    border-radius: 8px;
    overflow: hidden;
}

.dc-input {
    flex: 1;
    padding: .85rem 1.1rem;
    font-size: 1rem;
    border: 2px solid var(--dc-input-border, #e0e0e0);
    border-right: none;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color .2s;
    background: #fff !important;
    color: #333;
    min-width: 0;
    -webkit-appearance: none;
    appearance: none;
}
.dc-input:focus {
    border-color: var(--dc-input-border-focus, #0073aa) !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Search button — reset ALL inherited/theme borders */
.dc-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .85rem 1.6rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    /* Hard reset — overrides Elementor/theme form button styles */
    border: none !important;
    border-top: none !important;
    border-right: none !important;
    border-bottom: none !important;
    border-left: none !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    transition: filter .15s;
    white-space: nowrap;
    line-height: 1;
}
.dc-btn-search {
    min-width: 120px;
    /* border-radius set via JS */
}
.dc-btn-search:hover    { filter: brightness(.88); }
.dc-btn-search:disabled { opacity: .65; cursor: not-allowed; filter: none; }
.dc-btn-search:focus    { outline: none !important; box-shadow: none !important; }

/* ----- Spinner ----- */
.dc-spinner {
    display: none;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.35) !important;
    border-top-color: #fff !important;
    border-radius: 50%;
    animation: dc-spin .7s linear infinite;
    flex-shrink: 0;
}
.dc-btn-search.dc-loading .dc-btn-label { display: none; }
.dc-btn-search.dc-loading .dc-spinner   { display: inline-block; }
@keyframes dc-spin { to { transform: rotate(360deg); } }

/* ----- TLD badges ----- */
.dc-tld-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .8rem;
    justify-content: center;
}
.dc-tld-badge {
    background: #f0f4f8;
    color: #555;
    font-size: .75rem;
    padding: .2rem .55rem;
    border-radius: 20px;
    border: 1px solid #d8dfe6;
    font-family: monospace;
    letter-spacing: .02em;
    line-height: 1.4;
}

/* ============================================================
   RESULT CARD — horizontal layout
   ============================================================ */
.dc-result {
    width: 100%;
    box-sizing: border-box;
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    border: 1px solid transparent;
    animation: dc-fade-in .25s ease;
    /* Flex layout — columns: [icon+text] [price] [button] */
    display: flex !important;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
}

@keyframes dc-fade-in {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Left: icon + domain + status */
.dc-result__info {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex: 1 1 0;
    min-width: 0;
}

.dc-result__icon-wrap {
    flex-shrink: 0;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
}

.dc-result__text {
    min-width: 0;
    flex: 1;
}

.dc-result__domain {
    display: block;
    font-weight: 700;
    font-size: .95rem;
    font-family: monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dc-result__status {
    display: block;
    font-size: .88rem;
    font-weight: 600;
    margin-top: .1rem;
    white-space: nowrap;
}

/* Centre: price */
.dc-result__price-wrap {
    flex: 0 0 auto;
    text-align: right;
    white-space: nowrap;
}

.dc-result__price-main {
    display: block;
    font-size: 1rem;
    font-weight: 700;
}

.dc-result__price-sub {
    display: block;
    font-size: .76rem;
    opacity: .7;
    margin-top: .08rem;
}

/* Right: CTA button */
.dc-result__btn-wrap {
    flex: 0 0 auto;
}

.dc-btn-cart {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .65rem 1.15rem;
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    border: 2px solid transparent !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    transition: filter .15s;
    line-height: 1;
}
.dc-btn-cart:hover    { filter: brightness(.88); }
.dc-btn-cart:disabled { opacity: .6; cursor: not-allowed; filter: none; }
.dc-btn-cart:focus    { outline: none !important; box-shadow: none !important; }

/* ----- Auth-code block ----- */
.dc-auth-code-wrap {
    box-sizing: border-box;
    padding: .85rem 1rem;
    margin-top: .75rem;
    width: 100%;
}
.dc-auth-code-label {
    display: block;
    font-size: .88rem;
    font-weight: 600;
    margin-bottom: .35rem;
}
.dc-auth-code-input {
    width: 100%;
    max-width: 340px;
    padding: .55rem .8rem;
    font-size: .93rem;
    border: 1.5px solid #d1d5db !important;
    border-radius: 5px;
    outline: none !important;
    font-family: monospace;
    letter-spacing: .04em;
    transition: border-color .18s;
    box-sizing: border-box;
    background: #fff;
}
.dc-auth-code-input:focus {
    border-color: #6b7280 !important;
    outline: none !important;
    box-shadow: none !important;
}
.dc-auth-code-hint {
    font-size: .8rem;
    margin: .3rem 0 0;
    line-height: 1.45;
}

/* ----- Added-to-cart notice ----- */
.dc-added-notice {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .75rem 1.1rem;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 6px;
    font-size: .93rem;
    color: #166534;
    margin-top: 1rem;
    animation: dc-fade-in .25s ease;
    width: 100%;
    box-sizing: border-box;
}

/* ----- Locked qty in cart ----- */
.dc-qty-locked {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 36px;
    border: 1px solid #ddd !important;
    border-radius: 4px;
    background: #f9f9f9;
    color: #555;
    font-size: .95rem;
    font-weight: 600;
    cursor: default;
}

/* ----- Responsive ----- */
@media ( max-width: 600px ) {
    .dc-input-group   { flex-direction: column; border-radius: 8px; }
    .dc-input         { border-right: 2px solid var(--dc-input-border, #e0e0e0) !important;
                        border-bottom: none !important;
                        border-radius: 8px 8px 0 0 !important; }
    .dc-btn-search    { border-radius: 0 0 8px 8px !important; width: 100%; }
    .dc-result        { flex-wrap: wrap !important; max-width: 100% !important; }
    .dc-result__info  { flex: 1 1 100%; }
    .dc-result__price-wrap { text-align: left; flex: 1 1 auto; }
    .dc-result__btn-wrap   { flex: 0 0 auto; }
    .dc-auth-code-wrap     { max-width: 100% !important; }
}

/* ----- TLD Suggestion block ----- */
.dc-suggestion-wrap {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: .75rem;
    padding: .75rem 1rem;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
    animation: dc-fade-in .25s ease;
}

.dc-suggestion-text {
    font-size: .88rem;
    color: #475569;
    flex: 1 1 auto;
}

.dc-suggestion-text strong {
    font-family: monospace;
    color: #1e293b;
}

.dc-suggestion-btn {
    padding: .4rem .9rem !important;
    font-size: .83rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    color: #0073aa !important;
    border: 1.5px solid #0073aa !important;
    border-top: 1.5px solid #0073aa !important;
    border-right: 1.5px solid #0073aa !important;
    border-bottom: 1.5px solid #0073aa !important;
    border-left: 1.5px solid #0073aa !important;
    border-radius: 5px !important;
    outline: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transition: background .15s, color .15s;
    white-space: nowrap !important;
    flex: 0 0 auto;
    -webkit-appearance: none !important;
    appearance: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.4 !important;
}
.dc-suggestion-btn:hover,
.dc-suggestion-btn:focus {
    background: #0073aa !important;
    background-color: #0073aa !important;
    color: #fff !important;
    outline: none !important;
    box-shadow: none !important;
}

@media ( max-width: 600px ) {
    .dc-suggestion-wrap { flex-direction: column; align-items: flex-start; }
    .dc-suggestion-btn  { width: 100%; text-align: center; }
}
