/* Variables Gokiebox */
:root {
    --gokie-primary: #5bc0de; /* Turquesa Corporativo */
    --gokie-primary-dark: #46b8da;
    --gokie-dark: #333333;
    --gokie-light: #ffffff;
    --gokie-grey: #f4f6f8;
    --gokie-border: #e1e4e8;
    --gokie-success: #28a745;
    --gokie-error: #dc3545;
    --gokie-font: 'Poppins', sans-serif;
}

/* 1. Wrapper Principal */
.gokie-ds-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
    font-family: var(--gokie-font);
    box-sizing: border-box;
}

.gokie-ds-wrapper * {
    box-sizing: border-box;
}

/* Caja de Búsqueda */
.gokie-ds-search-box {
    background: var(--gokie-light);
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid var(--gokie-border);
    display: flex;
    flex-direction: column;
}

#gokie-ds-form {
    display: flex;
    gap: 8px;
    width: 100%;
}

#gokie-ds-input {
    flex-grow: 1;
    border: 1px solid transparent;
    background: transparent;
    padding: 12px 20px;
    font-size: 16px;
    font-family: var(--gokie-font);
    color: var(--gokie-dark);
    outline: none;
    border-radius: 6px;
    transition: background 0.2s;
}

#gokie-ds-input:focus {
    background: #f9f9f9;
}

#gokie-ds-btn {
    background: var(--gokie-primary);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0 30px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--gokie-font);
    white-space: nowrap;
}

#gokie-ds-btn:hover {
    background: var(--gokie-primary-dark);
    transform: translateY(-1px);
}

/* Loading Spinner */
.btn-loader {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
#gokie-ds-btn.loading .btn-text { display: none; }
#gokie-ds-btn.loading .btn-loader { display: block; }

/* 2. Mensajes de Error */
.gokie-msg {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    animation: slideDown 0.3s ease-out;
}

.gokie-msg.error {
    background-color: #ffe6e6;
    color: #cc0000;
    border: 1px solid #ffcccc;
}
.gokie-msg.error::before {
    content: "⚠️";
    margin-right: 10px;
}
.gokie-msg.error strong {
    font-weight: 700;
}

/* Tarjeta de Resultados */
.gokie-ds-results-container {
    margin-top: 15px;
}

.gokie-card {
    background: var(--gokie-light);
    border: 1px solid var(--gokie-border);
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideDown 0.3s ease-out;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.gokie-card.available { border-left: 5px solid var(--gokie-success); }
.gokie-card.taken { border-left: 5px solid var(--gokie-error); }

.gokie-card-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.gokie-domain-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gokie-dark);
}

.gokie-status-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.gokie-status-badge.available { background: #e6fffa; color: var(--gokie-success); }
.gokie-status-badge.taken { background: #fff5f5; color: var(--gokie-error); }

/* Botones de Acción */
.gokie-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    font-size: 13px;
    display: inline-block;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.gokie-btn.primary {
    background: var(--gokie-success);
    color: white;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.2);
}
.gokie-btn.primary:hover { background: #218838; transform: translateY(-2px); }

.gokie-btn.secondary {
    background: var(--gokie-grey);
    color: var(--gokie-dark);
    border: 1px solid var(--gokie-border);
}
.gokie-btn.secondary:hover { background: #e2e6ea; }

/* MODAL / POPUP */
.gokie-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(2px);
}

.gokie-modal-content {
    background-color: #ffffff; /* Modal Blanco */
    margin: 10vh auto;
    padding: 25px;
    border: none;
    width: 90%;
    max-width: 700px;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    font-family: var(--gokie-font);
}

.gokie-modal-content h3 {
    margin-top: 0;
    font-weight: 600;
    color: var(--gokie-dark);
    margin-bottom: 15px;
    border-bottom: 1px solid var(--gokie-border);
    padding-bottom: 10px;
}

.gokie-close-modal {
    color: #999;
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.gokie-close-modal:hover { color: var(--gokie-dark); }

/* ESTILO CORREGIDO DEL WHOIS DATA (BLANCO PURO) */
#gokie-whois-data {
    background-color: #ffffff !important; /* Forzamos blanco */
    color: #333333 !important;            /* Forzamos texto oscuro */
    border: 1px solid var(--gokie-border);
    padding: 20px;
    border-radius: 6px;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    margin-top: 0;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.03); /* Sombra interna muy sutil */
}

/* Scrollbar personalizado para el modal (opcional, para estética) */
#gokie-whois-data::-webkit-scrollbar {
    width: 8px;
}
#gokie-whois-data::-webkit-scrollbar-track {
    background: #f1f1f1; 
}
#gokie-whois-data::-webkit-scrollbar-thumb {
    background: #ccc; 
    border-radius: 4px;
}
#gokie-whois-data::-webkit-scrollbar-thumb:hover {
    background: #bbb; 
}

/* Mobile Responsive */
@media (max-width: 600px) {
    #gokie-ds-form { flex-direction: column; }
    #gokie-ds-btn { width: 100%; padding: 12px; }
    .gokie-card { flex-direction: column; text-align: center; gap: 15px; }
    .gokie-card.available, .gokie-card.taken { border-left: 1px solid var(--gokie-border); border-top: 5px solid; }
    .gokie-card-info { align-items: center; }
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }