/* ============================================================
   Advanced Whois Lookup – Professional Card UI
   ============================================================ */
:root {
    --bg: #f4f6f9;
    --card-bg: #ffffff;
    --text: #1a1a2e;
    --text-secondary: #4a4a6a;
    --border: #e2e8f0;
    --shadow: 0 8px 24px rgba(0,0,0,0.06);
    --primary: #003a87;
    --red: #db0601;
    --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="dark"] {
    --bg: #0f1117;
    --card-bg: #1c1e26;
    --text: #e4e6f0;
    --text-secondary: #a0a4b8;
    --border: #2e3140;
    --shadow: 0 8px 24px rgba(0,0,0,0.4);
}

* {
    box-sizing: border-box;
}

body {
    background: var(--bg);
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    transition: background 0.3s, color 0.3s;
}

/* ============================================================
   Search Bar – Modern, Attractive, Pill-Shaped
   ============================================================ */
.awl-search-wrapper-only {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 50px auto;
    max-width: 700px;
    padding: 0 20px;
}

.awl-search-wrapper-only input {
    flex: 1 1 300px;
    padding: 16px 24px;
    font-size: 1.05rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text);
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.awl-search-wrapper-only input::placeholder {
    color: #94a3b8;
}

.awl-search-wrapper-only input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.25);
}

.awl-search-wrapper-only button {
    padding: 16px 36px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    white-space: nowrap;
}

.awl-search-wrapper-only button:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
}

/* Loading spinner */
.awl-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0,0,0,0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: awl-spin 0.8s linear infinite;
    margin-left: 10px;
}

@keyframes awl-spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   Results Container
   ============================================================ */
.awl-results-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* ============================================================
   Card View (for result sections)
   ============================================================ */
.ipal-card-view {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.awl-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.awl-card-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    color: var(--text);
}

.ipal-action-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ipal-icon-btn {
    background: rgba(128,128,128,0.1);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px 12px;
    color: var(--text);
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ipal-icon-btn:hover {
    background: rgba(128,128,128,0.25);
    transform: translateY(-1px);
}

/* Clean list */
.ipal-clean-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ipal-clean-list > div {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.ipal-clean-list > div:last-child {
    border-bottom: none;
}

.ipal-clean-list span:first-child {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
    flex: 0 0 45%;
    max-width: 45%;
}

.ipal-clean-list span:last-child {
    color: var(--text-secondary);
    font-weight: 500;
    text-align: right;
    word-break: break-word;
    flex: 1;
    font-size: 0.95rem;
}

/* Table */
.ipal-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.ipal-table th,
.ipal-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.ipal-table th {
    font-weight: 600;
    color: var(--text);
}

/* Raw Whois block */
.awl-raw-whois {
    background: var(--bg);
    border-radius: 8px;
    padding: 15px;
    max-height: 300px;
    overflow: auto;
    font-family: monospace;
    font-size: 0.75rem;
    line-height: 1.3;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    white-space: pre-wrap;
    word-break: break-word;
}

/* Error message */
.awl-error {
    background: #fff0f0;
    color: #b00020;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
    .awl-search-wrapper-only {
        margin: 30px auto;
    }
}

@media (max-width: 600px) {
    .awl-search-wrapper-only {
        flex-direction: column;
        align-items: stretch;
        max-width: 100%;
        padding: 0 15px;
    }
    .awl-search-wrapper-only input {
        flex: 1 1 auto;
    }
    .awl-search-wrapper-only button {
        width: 100%;
    }

    .ipal-card-view {
        padding: 16px;
    }
    .ipal-clean-list span:first-child {
        font-size: 0.85rem;
        flex: 0 0 50%;
        max-width: 50%;
    }
    .ipal-clean-list span:last-child {
        font-size: 0.85rem;
    }
}