/* SPDX-License-Identifier: BSD-3-Clause */
/* Copyright (c) 2026 Aleksandr Ptakhin */

/* LalaSearch - Retro 1990s Shared Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #ffffff;
    color: #000000;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

/* Alpine.js: hide elements until processed */
[x-cloak] {
    display: none !important;
}

/* Header */
header {
    background-color: #cccccc;
    border-bottom: 3px solid #999999;
    padding: 20px;
    text-align: center;
    position: relative;
}

h1 {
    font-size: 32px;
    font-weight: bold;
    color: #000066;
    text-shadow: 2px 2px 0px #ffff00;
    margin-bottom: 10px;
}

h1 a {
    color: inherit;
    text-decoration: none;
}

h1 a:hover {
    text-decoration: underline;
}

.tagline {
    font-size: 12px;
    color: #666666;
    font-style: italic;
}

/* Auth button in header top-right */
.auth-header-btn {
    position: absolute;
    top: 15px;
    right: 20px;
}

.btn-signin, .btn-dashboard {
    background-color: #ffcc00;
    border: 3px outset #ffffff;
    border-left-color: #ffffff;
    border-top-color: #ffffff;
    border-right-color: #999999;
    border-bottom-color: #999999;
    color: #000000;
    font-weight: bold;
    font-size: 12px;
    padding: 6px 16px;
    cursor: pointer;
    text-decoration: none;
    font-family: Arial, sans-serif;
}

.btn-signin:active, .btn-dashboard:active {
    border-style: inset;
    border-left-color: #999999;
    border-top-color: #999999;
    border-right-color: #ffffff;
    border-bottom-color: #ffffff;
}

.btn-signin:hover, .btn-dashboard:hover {
    background-color: #ffdd33;
}

/* Main container */
.container {
    max-width: 800px;
    margin: 20px auto;
    padding: 0 20px;
}

/* Common form elements */
button {
    padding: 10px 20px;
    background-color: #cccccc;
    border: 3px outset #ffffff;
    border-left-color: #ffffff;
    border-top-color: #ffffff;
    border-right-color: #999999;
    border-bottom-color: #999999;
    color: #000000;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    font-family: Arial, sans-serif;
}

button:active {
    border-style: inset;
    border-left-color: #999999;
    border-top-color: #999999;
    border-right-color: #ffffff;
    border-bottom-color: #ffffff;
}

button:hover {
    background-color: #dddddd;
}

button:disabled {
    background-color: #e6e6e6;
    color: #999999;
    cursor: not-allowed;
    border-style: outset;
}

/* Search section */
.search-section {
    background-color: #ffffcc;
    border: 2px solid #999999;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 3px 3px 0px #cccccc;
}

.search-label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #000066;
}

.search-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

textarea {
    flex: 1;
    padding: 8px;
    border: 2px solid #999999;
    font-family: "Courier New", monospace;
    font-size: 12px;
    background-color: #ffffff;
    color: #000000;
    resize: vertical;
    min-height: 40px;
}

/* Text inputs */
input[type="email"],
input[type="text"] {
    padding: 8px;
    border: 2px solid #999999;
    font-family: "Courier New", monospace;
    font-size: 14px;
    background-color: #ffffff;
    color: #000000;
}

/* Select dropdown */
select {
    padding: 6px;
    border: 2px solid #999999;
    font-family: Arial, sans-serif;
    font-size: 12px;
    background-color: #ffffff;
}

/* Results section */
.results-section {
    margin-top: 20px;
}

.results-header {
    background-color: #cccccc;
    border-bottom: 2px solid #999999;
    padding: 10px;
    font-weight: bold;
    color: #000066;
    margin-bottom: 15px;
}

.results-info {
    background-color: #ffffcc;
    border: 1px solid #999999;
    padding: 10px;
    margin-bottom: 15px;
    font-size: 12px;
}

.search-result {
    background-color: #ffffff;
    border: 1px solid #999999;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 2px 2px 0px #e6e6e6;
}

.result-title {
    font-size: 16px;
    font-weight: bold;
    color: #0066cc;
    text-decoration: underline;
    margin-bottom: 5px;
    word-break: break-word;
}

.result-title:hover {
    color: #ff0000;
    cursor: pointer;
}

.result-url {
    font-size: 12px;
    color: #008000;
    font-family: "Courier New", monospace;
    margin-bottom: 8px;
    word-break: break-all;
}

.result-excerpt {
    font-size: 12px;
    color: #333333;
    margin-bottom: 8px;
    line-height: 1.5;
}

.result-excerpt mark {
    background-color: #ffff00;
    color: #000000;
    font-weight: bold;
    padding: 0 2px;
}

/* Loading indicator */
.loading {
    background-color: #ffffcc;
    border: 1px solid #999999;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    color: #000066;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #cccccc;
    border-top: 3px solid #000066;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error message */
.error {
    background-color: #ffcccc;
    border: 2px solid #ff0000;
    padding: 15px;
    margin-bottom: 15px;
    color: #cc0000;
    font-weight: bold;
}

/* Success message */
.success-box {
    background-color: #ccffcc;
    border: 2px solid #009900;
    padding: 20px;
    text-align: center;
    color: #006600;
}

/* Inline feedback messages */
.msg-success {
    color: #006600;
    font-weight: bold;
    margin-top: 10px;
    font-size: 12px;
}

.msg-error {
    color: #cc0000;
    font-weight: bold;
    margin-top: 10px;
    font-size: 12px;
}

/* No results */
.no-results {
    background-color: #ffffcc;
    border: 1px solid #999999;
    padding: 20px;
    text-align: center;
    color: #666666;
}

/* Footer */
footer {
    background-color: #cccccc;
    border-top: 3px solid #999999;
    padding: 15px;
    text-align: center;
    margin-top: 40px;
    font-size: 12px;
    color: #666666;
}

.footer-link {
    color: #0066cc;
    text-decoration: underline;
}

/* Pagination */
.pagination {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background-color: #ffffcc;
    border: 1px solid #999999;
}

.pagination button {
    margin: 0 5px;
}

/* ============================================================
   Sign-In Page
   ============================================================ */

.signin-box {
    background-color: #ffffcc;
    border: 2px solid #999999;
    padding: 30px;
    margin: 40px auto;
    max-width: 500px;
    box-shadow: 3px 3px 0px #cccccc;
}

.signin-box h2 {
    color: #000066;
    margin-bottom: 20px;
    text-align: center;
}

.signin-perks {
    text-align: center;
    font-size: 13px;
    color: #336633;
    margin-bottom: 20px;
}

.signin-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.signin-input-group input {
    flex: 1;
}

/* ============================================================
   Dashboard Page
   ============================================================ */

.dashboard-header {
    background-color: #cccccc;
    border: 2px solid #999999;
    padding: 10px 15px;
    margin-bottom: 20px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.dashboard-header .user-info {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.dashboard-section {
    background-color: #ffffcc;
    border: 2px solid #999999;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 3px 3px 0px #cccccc;
}

.dashboard-section h3 {
    color: #000066;
    margin-bottom: 15px;
    border-bottom: 2px solid #999999;
    padding-bottom: 8px;
}

/* Inline form groups */
.inline-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.inline-form input {
    padding: 6px 8px;
    border: 2px solid #999999;
    font-family: "Courier New", monospace;
    font-size: 12px;
    flex: 1;
    min-width: 200px;
}

/* Data table (members, domains) */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-top: 15px;
}

.data-table th {
    background-color: #cccccc;
    border: 1px solid #999999;
    padding: 6px 10px;
    text-align: left;
    font-weight: bold;
    color: #000066;
}

.data-table td {
    border: 1px solid #cccccc;
    padding: 6px 10px;
    background-color: #ffffff;
    word-break: break-all;
}

.data-table tr:hover td {
    background-color: #fffff0;
}

/* Delete/remove button (small, red) */
.btn-delete {
    background-color: #ffcccc;
    border: 2px outset #ffffff;
    border-left-color: #ffffff;
    border-top-color: #ffffff;
    border-right-color: #999999;
    border-bottom-color: #999999;
    color: #cc0000;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 8px;
    cursor: pointer;
    font-family: Arial, sans-serif;
}

.btn-delete:active {
    border-style: inset;
    border-left-color: #999999;
    border-top-color: #999999;
    border-right-color: #ffffff;
    border-bottom-color: #ffffff;
}

.btn-delete:hover {
    background-color: #ff9999;
}

/* Undo / Redo bar */
.undo-redo-bar {
    background-color: #ffffcc;
    border: 2px solid #cc9900;
    padding: 6px 12px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.undo-redo-desc {
    flex: 1;
    font-size: 13px;
    color: #333333;
}

.btn-undo, .btn-redo {
    background-color: #ffcc00;
    border: 2px outset #ffffff;
    border-left-color: #ffffff;
    border-top-color: #ffffff;
    border-right-color: #999999;
    border-bottom-color: #999999;
    color: #000000;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 12px;
    cursor: pointer;
    font-family: Arial, sans-serif;
}

.btn-undo:disabled, .btn-redo:disabled {
    background-color: #dddddd;
    color: #999999;
    cursor: default;
    border-color: #cccccc;
}

.btn-undo:not(:disabled):active, .btn-redo:not(:disabled):active {
    border-style: inset;
    border-left-color: #999999;
    border-top-color: #999999;
    border-right-color: #ffffff;
    border-bottom-color: #ffffff;
}

.btn-undo:not(:disabled):hover, .btn-redo:not(:disabled):hover {
    background-color: #ffdd33;
}

/* ============================================================
   Onboarding Page
   ============================================================ */

.onboarding-welcome {
    text-align: center;
    margin-bottom: 25px;
}

.onboarding-welcome h2 {
    color: #000066;
    margin-bottom: 8px;
}

.onboarding-welcome p {
    color: #666666;
    font-size: 13px;
}

.onboarding-domain-suggestion {
    background-color: #ccffcc;
    border: 2px solid #009900;
    padding: 10px 15px;
    font-family: "Courier New", monospace;
    font-size: 16px;
    color: #006600;
    text-align: center;
}

.onboarding-presets {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.onboarding-preset-btn {
    padding: 8px 14px;
    font-size: 12px;
    background-color: #cccccc;
    border: 3px outset #ffffff;
    border-left-color: #ffffff;
    border-top-color: #ffffff;
    border-right-color: #999999;
    border-bottom-color: #999999;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-weight: bold;
}

.onboarding-preset-btn:hover {
    background-color: #dddddd;
}

.onboarding-preset-btn.preset-selected {
    background-color: #ffcc00;
    border-style: inset;
    border-left-color: #999999;
    border-top-color: #999999;
    border-right-color: #ffffff;
    border-bottom-color: #ffffff;
}

/* Console (terminal aesthetic) */
.onboarding-console {
    background-color: #000000;
    border: 2px solid #333333;
    font-family: "Courier New", monospace;
    font-size: 12px;
    color: #00ff00;
}

.console-header {
    background-color: #1a1a1a;
    padding: 8px 12px;
    border-bottom: 1px solid #333333;
    font-size: 11px;
    color: #aaaaaa;
}

.console-body {
    padding: 10px 12px;
    max-height: 300px;
    overflow-y: auto;
    min-height: 80px;
}

.console-line {
    margin-bottom: 4px;
    line-height: 1.5;
    word-break: break-all;
}

.console-waiting {
    color: #666666;
}

.console-status {
    color: #00ff00;
    margin-right: 6px;
}

.console-url {
    color: #66ccff;
    margin-right: 8px;
}

.console-size {
    color: #999999;
    margin-right: 8px;
}

.console-title {
    color: #ffffff;
    margin-right: 8px;
}

.console-keywords {
    color: #ffcc00;
}

.console-footer {
    background-color: #1a1a1a;
    padding: 6px 12px;
    border-top: 1px solid #333333;
    font-size: 11px;
    color: #aaaaaa;
}

/* Integration cards */
.onboarding-integrations {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.integration-card {
    flex: 1;
    min-width: 180px;
    background-color: #ffffff;
    border: 2px solid #cccccc;
    padding: 15px;
    text-align: center;
}

.integration-card strong {
    display: block;
    color: #000066;
    margin-bottom: 6px;
}

.integration-card p {
    font-size: 11px;
    color: #666666;
    margin-bottom: 8px;
}

.integration-coming-soon {
    opacity: 0.7;
}

.badge-coming-soon {
    display: inline-block;
    background-color: #cccccc;
    border: 1px solid #999999;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 8px;
    color: #666666;
}

/* Index history on onboarding */
.onboarding-index-history {
    background-color: #ffffff;
    border: 1px solid #cccccc;
    font-size: 12px;
}

.index-history-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 10px;
    border-bottom: 1px solid #eeeeee;
}

.index-history-item:last-child {
    border-bottom: none;
}

.index-history-title {
    color: #0066cc;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    margin-right: 10px;
}

.index-history-size {
    color: #999999;
    white-space: nowrap;
}

/* Keyword suggestion pills */
.onboarding-suggestions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.suggestion-pill {
    padding: 4px 12px;
    font-size: 12px;
    background-color: #e6e6ff;
    border: 2px outset #ffffff;
    border-left-color: #ffffff;
    border-top-color: #ffffff;
    border-right-color: #9999cc;
    border-bottom-color: #9999cc;
    color: #000066;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-weight: bold;
}

.suggestion-pill:hover {
    background-color: #ccccff;
}

.suggestion-pill.pill-selected {
    background-color: #ffcc00;
    border-style: inset;
    border-left-color: #999999;
    border-top-color: #999999;
    border-right-color: #ffffff;
    border-bottom-color: #ffffff;
}
