/* Onboarding Modal Styles */
.qfos-onboarding-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Dark, blocking background */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999; /* Ensure it's on top of absolutely everything */
}

.qfos-onboarding-modal-content {
    background-color: #fff;
    padding: 25px 30px;
    border-radius: 8px;
    width: 95%;
    max-width: 800px; /* Make modal wider for more complex forms */
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}

.qfos-onboarding-modal-header h4 {
    margin: 0 0 15px 0;
    font-size: 1.6em;
    color: #333;
}

.qfos-onboarding-step h4 { margin-top: 0; }
.qfos-onboarding-step p {
    font-size: 1.1em;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.qfos-onboarding-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Progress Bar Styles */
.qfos-onboarding-progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    counter-reset: step;
}
.qfos-onboarding-progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    color: #aaa;
    font-size: 0.9em;
}
.qfos-onboarding-progress-step::before {
    content: '';
    width: 24px;
    height: 24px;
    line-height: 24px;
    border: 2px solid #ccc;
    display: block;
    margin: 0 auto 10px auto;
    border-radius: 50%;
    background-color: white;
}
.qfos-onboarding-progress-step.active::before {
    border-color: #3498db;
    background-color: #3498db;
}
.qfos-onboarding-progress-step.active {
    color: #3498db;
    font-weight: bold;
}
.qfos-onboarding-progress-step.completed::before {
    border-color: #2ecc71;
    background-color: #2ecc71;
    content: '\2713'; /* Checkmark */
    color: white;
}
.qfos-onboarding-progress-step.completed {
    color: #2ecc71;
}

.qfos-onboarding-secondary-link {
    font-size: 0.9em;
    color: #777;
    text-decoration: underline;
}

/* --- NEW: Form Element Styling --- */

.qfos-onboarding-step .form-table {
    width: 100%;
    border-collapse: collapse;
}

.qfos-onboarding-step .form-table th,
.qfos-onboarding-step .form-table td {
    padding: 12px 10px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

.qfos-onboarding-step .form-table th {
    width: 30%;
    font-weight: 600;
    color: #444;
}

.qfos-onboarding-step .regular-text,
.qfos-onboarding-step select {
    width: 100%;
    max-width: 350px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fdfdfd;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.qfos-onboarding-step .regular-text:focus,
.qfos-onboarding-step select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    outline: none;
}

.qfos-onboarding-step input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

.qfos-onboarding-step h5 {
    font-size: 1.2em;
    margin-top: 0;
    padding-bottom: 5px;
    border-bottom: 2px solid #f0f0f0;
}

/* --- NEW: Tab Styling for Step 3 --- */
.qfos-onboarding-tabs {
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.qfos-onboarding-tab-link {
    background-color: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    padding: 10px 15px;
    margin-right: 5px;
    margin-bottom: -1px; /* Overlap the container's bottom border */
    outline: none;
    transition: border-color 0.3s, color 0.3s;
    color: #555;
    font-size: 1em;
    font-weight: 500;
}

.qfos-onboarding-tab-link.active {
    border-bottom-color: #3498db;
    color: #000;
    font-weight: 600;
}

.qfos-onboarding-tab-content { display: none; }
.qfos-onboarding-tab-content.active { display: block; }

/* --- NEW: Enhanced Ticker Search & Tag UI --- */

/* Search Input Field */
.quantfos-ticker-search-input-wrapper {
    position: relative;
}

.quantfos-ticker-search-input-wrapper .dashicons-search {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

.quantfos-ticker-search-input {
    padding-left: 40px !important; /* Make space for the icon */
    border-radius: 6px !important;
    border: 1px solid #ccc !important;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-size: 1em !important;
    height: 40px;
    box-shadow: none !important;
}

.quantfos-ticker-search-input:focus {
    border-color: #3498db !important;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2) !important;
    outline: none;
}

/* Search Results Dropdown */
.quantfos-ticker-search-results-dropdown {
    /* position: absolute; This is crucial for positioning */
    top: 100%; /* Position it right below the input wrapper */
    left: 0;
    right: 0;
    z-index: 1000; /* Ensure it appears above other modal content */
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    max-height: 220px;
    overflow-y: auto;
    margin-top: 4px;
}

.quantfos-ticker-search-results-dropdown li {
    padding: 10px 15px;
    font-size: 0.95em;
    border-bottom: 1px solid #f0f0f0;
}
.quantfos-ticker-search-results-dropdown li:last-child {
    border-bottom: none;
}
.quantfos-ticker-search-results-dropdown li:hover {
    background-color: #f5faff;
    color: #3498db;
}

/* Selected Ticker Tags */
.quantfos-selected-ticker-tag {
    display: inline-flex; /* Ensures items sit side-by-side */
    align-items: center;
    background-color: #e0eafc;
    border: 1px solid #c4d5f2;
    color: #334d7c;
    padding: 5px 10px;
    border-radius: 16px; /* Pill shape */
    font-weight: 600;
    font-size: 0.9em;
    margin: 3px; /* Add spacing between tags */
    transition: background-color 0.2s;
}

.quantfos-selected-ticker-tag .remove-selected-tag {
    background: #a8b9d6;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: background-color 0.2s;
}
.quantfos-selected-ticker-tag .remove-selected-tag:hover {
    background-color: #c0392b; /* Red on hover for delete action */
}

/* --- NEW: Welcome Screen CTA Styles --- */
#qfos-onboarding-welcome-screen {
    text-align: center;
    padding: 20px;
}

#qfos-onboarding-welcome-screen .welcome-icon {
    font-size: 60px;
    line-height: 1;
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    background-color: #f0f5fa;
    color: #3498db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#qfos-onboarding-welcome-screen .button-hero {
    padding: 12px 24px;
    height: auto;
    font-size: 1.2em;
    margin-top: 20px;
}