/* =============================================
   Domain Checker — Estilos Frontend
   ============================================= */

.dc-wrapper {
    max-width: 780px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Caja de búsqueda */
.dc-search-box {
    background: #fff;
    border-radius: 12px;
    padding: 28px 28px 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.09);
    margin-bottom: 24px;
}

.dc-input-row {
    display: flex;
    gap: 10px;
}

#dc-domain-input {
    flex: 1;
    padding: 14px 18px;
    font-size: 17px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
    color: #222;
}

#dc-domain-input:focus {
    border-color: #2563eb;
}

#dc-search-btn {
    padding: 14px 28px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
}

#dc-search-btn:hover {
    background: #1d4ed8;
}

#dc-search-btn:active {
    transform: scale(0.97);
}

#dc-search-btn:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

.dc-hint {
    margin: 10px 0 0;
    font-size: 13px;
    color: #888;
}

/* Resultados */
.dc-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dc-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    border-left: 5px solid transparent;
    animation: dc-fadein 0.25s ease;
    flex-wrap: wrap;
    gap: 10px;
}

@keyframes dc-fadein {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dc-result-item.available {
    border-left-color: #22c55e;
}

.dc-result-item.taken {
    border-left-color: #ef4444;
    opacity: 0.75;
}

.dc-result-item.unknown {
    border-left-color: #f59e0b;
    opacity: 0.8;
}

.dc-domain-name {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    min-width: 200px;
}

.dc-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.dc-status-badge.available {
    background: #dcfce7;
    color: #16a34a;
}

.dc-status-badge.taken {
    background: #fee2e2;
    color: #dc2626;
}

.dc-status-badge.unknown {
    background: #fef3c7;
    color: #b45309;
}

.dc-right {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
}

.dc-price {
    font-size: 17px;
    font-weight: 700;
    color: #2563eb;
}

.dc-price span {
    font-size: 12px;
    font-weight: 400;
    color: #888;
}

/* Botón agregar al carrito */
.dc-add-to-cart {
    padding: 9px 20px;
    background: #22c55e;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.dc-add-to-cart:hover {
    background: #16a34a;
}

.dc-add-to-cart:disabled {
    background: #86efac;
    cursor: not-allowed;
}

/* Mensaje de feedback */
.dc-message {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    margin-top: 12px;
}

.dc-message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.dc-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Skeleton loader */
.dc-skeleton {
    background: #f1f5f9;
    border-radius: 10px;
    padding: 22px 20px;
    margin-bottom: 10px;
    animation: dc-pulse 1.2s ease-in-out infinite;
}

@keyframes dc-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

/* Responsive */
@media (max-width: 560px) {
    .dc-input-row {
        flex-direction: column;
    }
    #dc-search-btn {
        width: 100%;
    }
    .dc-result-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .dc-right {
        width: 100%;
        justify-content: space-between;
        margin-left: 0;
    }
}

/* =============================================
   MODAL DE UPSELL — Hosting
   ============================================= */

#dc-upsell-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#dc-upsell-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

#dc-upsell-box {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 40px 36px 32px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0,0,0,0.25);
    transform: translateY(20px) scale(0.96);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(.34,1.56,.64,1), opacity 0.3s ease;
}

#dc-upsell-box.dc-upsell-visible {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.dc-upsell-icon {
    font-size: 48px;
    margin-bottom: 12px;
    animation: dc-bounce 0.6s ease;
}

@keyframes dc-bounce {
    0%   { transform: scale(0.5); opacity: 0; }
    70%  { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.dc-upsell-title {
    font-size: 24px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 6px;
}

.dc-upsell-domain {
    font-size: 16px;
    font-weight: 700;
    color: #2563eb;
    background: #eff6ff;
    display: inline-block;
    padding: 4px 16px;
    border-radius: 20px;
    margin: 0 0 16px;
}

.dc-upsell-question {
    font-size: 15px;
    color: #475569;
    margin: 0 0 24px;
    line-height: 1.5;
}

.dc-upsell-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.dc-upsell-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 12px;
    text-decoration: none !important;
    transition: transform 0.15s, box-shadow 0.15s;
    text-align: left;
    border: 2px solid transparent;
}

.dc-upsell-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    text-decoration: none !important;
}

.dc-upsell-yes {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff !important;
    border-color: #2563eb;
}

.dc-upsell-no {
    background: #f8fafc;
    color: #1e293b !important;
    border-color: #e2e8f0;
}

.dc-upsell-btn-icon {
    font-size: 26px;
    flex-shrink: 0;
}

.dc-upsell-btn-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dc-upsell-btn-text strong {
    font-size: 15px;
    font-weight: 700;
    display: block;
}

.dc-upsell-yes .dc-upsell-btn-text strong,
.dc-upsell-yes .dc-upsell-btn-text small {
    color: #fff;
}

.dc-upsell-btn-text small {
    font-size: 12px;
    color: #64748b;
    font-weight: 400;
}

#dc-upsell-cancel {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

#dc-upsell-cancel:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* Spinner inline */
.dc-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: dc-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 4px;
}

@keyframes dc-spin {
    to { transform: rotate(360deg); }
}

/* Responsive modal */
@media (max-width: 520px) {
    #dc-upsell-box {
        padding: 28px 20px 24px;
    }
    .dc-upsell-title { font-size: 20px; }
    .dc-upsell-btn   { padding: 14px 16px; }
}

/* =============================================
   MODAL DE CARGA — Loading
   ============================================= */

#dc-loading-modal {
    position: fixed;
    inset: 0;
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#dc-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#dc-loading-box {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 40px 36px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0,0,0,0.2);
    transform: scale(0.92);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(.34,1.56,.64,1), opacity 0.3s ease;
}

#dc-loading-box.dc-loading-visible {
    transform: scale(1);
    opacity: 1;
}

/* Spinner animado */
.dc-loading-spinner {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
}

.dc-spin-ring {
    position: absolute;
    inset: 0;
    border: 4px solid #f1f5f9;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: dc-rotate 0.9s linear infinite;
}

.dc-spin-logo {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    animation: dc-pulse-logo 1.8s ease-in-out infinite;
}

@keyframes dc-rotate {
    to { transform: rotate(360deg); }
}

@keyframes dc-pulse-logo {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.15); }
}

#dc-loading-title {
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 8px;
}

#dc-loading-msg {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 16px;
    min-height: 20px;
    line-height: 1.5;
}

/* Puntos animados */
.dc-loading-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.dc-loading-dots span {
    width: 8px;
    height: 8px;
    background: #2563eb;
    border-radius: 50%;
    animation: dc-dot-bounce 1.2s ease-in-out infinite;
}

.dc-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.dc-loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dc-dot-bounce {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50%       { transform: translateY(-8px); opacity: 1; }
}

/* =============================================
   PAGINACIÓN
   ============================================= */

.dc-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.dc-page-btn {
    padding: 8px 14px;
    border: 2px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: #475569;
    transition: all 0.15s;
}

.dc-page-btn:hover:not(:disabled) {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}

.dc-page-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.dc-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.dc-prev, .dc-next {
    padding: 8px 16px;
    font-size: 13px;
}

/* =============================================
   ADMIN — Add TLD box
   ============================================= */
.dc-add-tld-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    margin: 16px 0 20px;
}

.dc-add-tld-box h3 {
    margin: 0 0 12px;
    font-size: 14px;
    color: #1e293b;
}

.dc-add-tld-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.dc-add-tld-row input[type="text"],
.dc-add-tld-row input[type="number"] {
    padding: 7px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
}

#dc-new-tld    { width: 80px; }
#dc-new-label  { width: 180px; }
#dc-new-price  { width: 100px; }

.dc-custom-badge {
    font-size: 10px;
    background: #fef3c7;
    color: #92400e;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 600;
    margin-left: 4px;
    text-transform: uppercase;
}

.dc-label-input {
    width: 160px;
    padding: 4px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 13px;
}
