/* OAG IS Audit Tool — custom styles on top of Pico CSS */

/* Tab navigation */
.tab-link {
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
}
.tab-link.active {
    background: var(--pico-primary);
    color: var(--pico-primary-inverse) !important;
}

/* Upload area */
.upload-area {
    border: 2px dashed var(--pico-muted-border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.upload-area:hover {
    border-color: var(--pico-primary);
    background: var(--pico-primary-focus);
}
.file-selected {
    color: var(--pico-primary);
    font-weight: 600;
}

/* Steps */
.step {
    margin-bottom: 1.2rem;
}

/* Status boxes */
.status-box {
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
}
.status-box.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}
.status-box.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}
.status-box.info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Download button */
.btn-download {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.5rem 1.5rem;
    background: var(--pico-primary);
    color: var(--pico-primary-inverse) !important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
}
.btn-download:hover {
    opacity: 0.9;
}

/* Column chips */
.columns-display {
    margin-top: 0.75rem;
}
.chip-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.4rem;
}
.chip {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--pico-secondary-background);
    color: var(--pico-secondary-inverse);
    border-radius: 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
}
.chip:hover {
    background: var(--pico-primary);
    color: var(--pico-primary-inverse);
}

/* Autocomplete dropdown */
.autocomplete-wrapper {
    position: relative;
}
.autocomplete-dropdown {
    position: absolute;
    z-index: 100;
    background: var(--pico-background-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    width: 240px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.autocomplete-item {
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    font-size: 0.85rem;
}
.autocomplete-item:hover,
.autocomplete-item.active {
    background: var(--pico-primary);
    color: var(--pico-primary-inverse);
}

/* Output columns */
.output-cols {
    margin-top: 0.5rem;
}
.output-col-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.3rem;
}
.output-col-row input {
    margin-bottom: 0;
}
.btn-remove {
    padding: 0.2rem 0.6rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    line-height: 1;
}

/* Progress info */
.progress-info {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.error-detail {
    color: #721c24;
    margin-top: 0.5rem;
}

/* API key hints */
.hint-text {
    color: var(--pico-muted-color);
}
.hint-warn {
    color: #856404;
    font-weight: 500;
}

/* Run button */
.btn-run {
    width: 100%;
    font-size: 1.1rem;
}

/* Auth */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}
.auth-card {
    max-width: 420px;
    width: 100%;
}
.auth-link {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
}
.qr-container {
    text-align: center;
    margin: 1rem 0;
}
.qr-code {
    max-width: 220px;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 8px;
}
[x-cloak] { display: none !important; }

/* User info in nav */
.user-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.logout-link {
    font-size: 0.85rem;
    color: var(--pico-del-color);
}

/* API Keys settings */
.api-key-row {
    padding: 1rem 0;
    border-bottom: 1px solid var(--pico-muted-border-color);
}
.api-key-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}
.api-key-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.api-key-actions button {
    padding: 0.3rem 0.8rem;
    margin-bottom: 0;
}
.key-input {
    margin-bottom: 0 !important;
    flex: 1;
}
.key-message {
    margin-top: 0.3rem;
    color: var(--pico-primary);
}

/* Badges */
.badge-saved {
    font-size: 0.75rem;
    padding: 0.1rem 0.5rem;
    background: #d4edda;
    color: #155724;
    border-radius: 10px;
}
.badge-none {
    font-size: 0.75rem;
    padding: 0.1rem 0.5rem;
    background: #f8f9fa;
    color: #6c757d;
    border-radius: 10px;
}
.badge-active {
    font-size: 0.75rem;
    padding: 0.1rem 0.5rem;
    background: #d4edda;
    color: #155724;
    border-radius: 10px;
}
.badge-inactive {
    font-size: 0.75rem;
    padding: 0.1rem 0.5rem;
    background: #f8d7da;
    color: #721c24;
    border-radius: 10px;
}
