/**
 * wizard.css - OSINT.science Investigation Wizards Styles
 *
 * Dark theme styling for the multi-phase search wizard interface.
 */

/* ============================================
   Page Layout
   ============================================ */

.wizard-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #0f1115 0%, #1a1d23 100%);
    color: #e0e0e0;
    padding: 0;
    overflow-y: auto;
}

html, body {
    overflow-y: auto !important;
    height: auto !important;
}

.wizard-header-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: rgba(26, 29, 35, 0.95);
    border-bottom: 1px solid #2d3139;
    position: sticky;
    top: 0;
    z-index: 100;
}

.wizard-back-home {
    color: #8b9dc3;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.wizard-back-home:hover {
    color: #4dabf7;
}

.wizard-title-nav {
    font-size: 1.2rem;
    font-weight: 600;
    color: #e0e0e0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wizard-tier-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.wizard-tier-badge.tier-free {
    background: rgba(139, 157, 195, 0.2);
    color: #8b9dc3;
}

.wizard-tier-badge.tier-pro {
    background: linear-gradient(135deg, #ffd700 0%, #ff9500 100%);
    color: #1a1d23;
}

.wizard-tier-badge.tier-admin {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8787 100%);
    color: #1a1d23;
}

/* ============================================
   Step Container
   ============================================ */

.wizard-step {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    padding-bottom: 4rem;
}

#wizard-report {
    overflow-y: visible;
    height: auto;
}

/* ============================================
   Step 1: Wizard Selection
   ============================================ */

.wizard-intro {
    text-align: center;
    margin-bottom: 2rem;
}

.wizard-intro h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, #4dabf7, #74c0fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wizard-subtitle {
    color: #8b9dc3;
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.wizard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.wizard-card {
    background: linear-gradient(145deg, #1e2128 0%, #252830 100%);
    border: 1px solid #2d3139;
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.wizard-card:hover {
    border-color: #4dabf7;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(77, 171, 247, 0.15);
}

.wizard-card[data-tier="pro"]:hover {
    border-color: #ffd700;
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.15);
}

.wizard-card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.wizard-card-content {
    flex: 1;
}

.wizard-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 0.5rem;
}

.wizard-card-desc {
    font-size: 0.85rem;
    color: #8b9dc3;
    line-height: 1.5;
}

.wizard-badge-pro {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #ffd700 0%, #ff9500 100%);
    color: #1a1d23;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
}

.wizard-footer {
    margin-top: 3rem;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #2d3139;
}

.wizard-footer-text {
    color: #6c7280;
    font-size: 0.85rem;
}

.theory-tag {
    display: inline-block;
    background: rgba(77, 171, 247, 0.1);
    color: #4dabf7;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin: 0.25rem;
}

/* ============================================
   Step 2: Input Form
   ============================================ */

.wizard-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.wizard-back {
    background: none;
    border: 1px solid #2d3139;
    color: #8b9dc3;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.wizard-back:hover {
    border-color: #4dabf7;
    color: #4dabf7;
}

.wizard-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wizard-icon {
    font-size: 1.25em;
}

.wizard-form-description {
    color: #8b9dc3;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

#wizard-input-form {
    max-width: 600px;
}

.wizard-field {
    margin-bottom: 1.5rem;
}

.wizard-field label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #e0e0e0;
}

.wizard-field label .required {
    color: #ff6b6b;
}

.wizard-field input,
.wizard-field select,
.wizard-field textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #1e2128;
    border: 1px solid #2d3139;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.wizard-field input:focus,
.wizard-field select:focus,
.wizard-field textarea:focus {
    outline: none;
    border-color: #4dabf7;
}

.wizard-field input::placeholder,
.wizard-field textarea::placeholder {
    color: #6c7280;
}

.wizard-field-help {
    font-size: 0.8rem;
    color: #6c7280;
    margin-top: 0.25rem;
}

.wizard-execute-btn {
    background: linear-gradient(135deg, #4dabf7 0%, #339af0 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
}

.wizard-execute-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(77, 171, 247, 0.3);
}

/* ============================================
   Step 3: Execution Progress
   ============================================ */

.wizard-phases {
    margin-bottom: 2rem;
}

.wizard-phase {
    background: #1e2128;
    border: 1px solid #2d3139;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.wizard-phase-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wizard-phase-num {
    background: rgba(77, 171, 247, 0.2);
    color: #4dabf7;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.wizard-phase-name {
    flex: 1;
    font-weight: 500;
    color: #e0e0e0;
}

.wizard-phase-status {
    font-size: 0.9rem;
}

.wizard-phase-status.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.wizard-phase-desc {
    font-size: 0.85rem;
    color: #8b9dc3;
    margin-top: 0.5rem;
}

.wizard-phase-queries {
    margin-top: 0.75rem;
    padding-left: 0.5rem;
}

.wizard-query {
    font-size: 0.8rem;
    color: #6c7280;
    padding: 0.25rem 0;
}

.query-icon {
    margin-right: 0.5rem;
}

.wizard-results-stream {
    background: #1e2128;
    border: 1px solid #2d3139;
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.stream-header {
    padding: 0.75rem 1rem;
    background: #252830;
    border-bottom: 1px solid #2d3139;
    font-weight: 500;
    color: #8b9dc3;
    position: sticky;
    top: 0;
}

.results-list {
    padding: 0.5rem;
}

.wizard-result-item {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #2d3139;
    display: flex;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.wizard-result-item:last-child {
    border-bottom: none;
}

.wizard-result-source {
    color: #4dabf7;
    font-weight: 500;
    white-space: nowrap;
    font-size: 0.75rem;
    padding: 0.1rem 0.4rem;
    background: rgba(77, 171, 247, 0.1);
    border-radius: 4px;
}

.wizard-result-title {
    color: #e0e0e0;
    text-decoration: none;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wizard-result-title:hover {
    color: #4dabf7;
}

.wizard-error {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

/* Loading state */
.wizard-loading {
    text-align: center;
    padding: 3rem 2rem;
}

.wizard-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #2d3139;
    border-top-color: #4dabf7;
    border-radius: 50%;
    animation: wizard-spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

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

.wizard-loading-text {
    font-size: 1.2rem;
    color: #e0e0e0;
    margin-bottom: 0.5rem;
}

.wizard-loading-detail {
    font-size: 0.9rem;
    color: #6c7280;
}

/* ============================================
   Step 4: Report
   ============================================ */

.wizard-report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.wizard-report-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.wizard-report-actions {
    display: flex;
    gap: 0.5rem;
}

.wizard-report-actions button {
    background: #1e2128;
    border: 1px solid #2d3139;
    color: #8b9dc3;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s;
}

.wizard-report-actions button:hover {
    border-color: #4dabf7;
    color: #4dabf7;
}

.new-search-btn {
    background: linear-gradient(135deg, #4dabf7 0%, #339af0 100%) !important;
    color: white !important;
    border: none !important;
}

.wizard-report-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #1e2128;
    border-radius: 8px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stat-icon {
    font-size: 1.5rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #e0e0e0;
}

.stat-label {
    font-size: 0.75rem;
    color: #6c7280;
}

.wizard-report-content {
    background: #1e2128;
    border: 1px solid #2d3139;
    border-radius: 8px;
    padding: 2rem;
    overflow-y: auto;
    max-height: none;
}

.wizard-report-narrative {
    line-height: 1.7;
    color: #e0e0e0;
}

.wizard-report-narrative h2,
.wizard-report-narrative h3,
.wizard-report-narrative h4 {
    color: #4dabf7;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.wizard-report-narrative h2 { font-size: 1.4rem; }
.wizard-report-narrative h3 { font-size: 1.2rem; }
.wizard-report-narrative h4 { font-size: 1.05rem; }

.wizard-report-narrative ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.wizard-report-narrative li {
    margin-bottom: 0.25rem;
}

.wizard-report-narrative strong {
    color: #74c0fc;
}

.wizard-cite {
    color: #4dabf7;
    font-size: 0.8em;
}

.wizard-phase-details {
    margin-top: 1.5rem;
    border: 1px solid #2d3139;
    border-radius: 8px;
}

.wizard-phase-details summary {
    padding: 1rem;
    background: #252830;
    cursor: pointer;
    font-weight: 500;
    color: #8b9dc3;
    border-radius: 8px;
}

.wizard-phase-details[open] summary {
    border-radius: 8px 8px 0 0;
}

.wizard-phase-details .phase-content {
    padding: 1rem;
    line-height: 1.6;
}

.wizard-extractions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #2d3139;
}

.wizard-extractions h3 {
    color: #8b9dc3;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.extraction-type {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.extraction-label {
    color: #4dabf7;
    font-weight: 500;
    text-transform: capitalize;
}

.extraction-values {
    color: #8b9dc3;
    margin-left: 0.5rem;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    .wizard-header-nav {
        padding: 1rem;
    }

    .wizard-step {
        padding: 1rem;
    }

    .wizard-intro h1 {
        font-size: 1.5rem;
    }

    .wizard-grid {
        grid-template-columns: 1fr;
    }

    .wizard-report-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .wizard-report-stats {
        justify-content: space-around;
    }
}
