/**
 * Fantasy Draft Board v4.0 - Strategy Wizard Styles
 * 
 * Styles for the conversational strategy wizard and
 * strategy selection modal. Dark theme matching app.
 * 
 * @version 4.1
 */

/* ============================================
   MODAL OVERLAY
   ============================================ */

.sw-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
    animation: swFadeIn 0.2s ease-out;
}

@keyframes swFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================
   MODAL CONTENT
   ============================================ */

.sw-modal-content {
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 14px;
    width: 100%;
    max-width: 540px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5);
    animation: swSlideUp 0.25s ease-out;
    overflow: hidden;
}

.sw-selection-modal {
    max-width: 520px;
}

@keyframes swSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   HEADER
   ============================================ */

.sw-header {
    background: linear-gradient(135deg, #0d9488, #0891b2);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.sw-header-success {
    background: linear-gradient(135deg, #059669, #10b981);
}

.sw-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

.sw-header-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    margin-top: 0.15rem;
}

.sw-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sw-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   BODY
   ============================================ */

.sw-body {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* ============================================
   PROGRESS BAR
   ============================================ */

.sw-progress {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 1.5rem;
}

.sw-progress-dot {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: #334155;
    transition: background 0.3s ease;
}

.sw-progress-dot.active {
    background: #3b82f6;
}

.sw-progress-dot.current {
    background: #60a5fa;
    box-shadow: 0 0 6px rgba(96, 165, 250, 0.4);
}

/* ============================================
   JERRY MESSAGE BUBBLES
   ============================================ */

.sw-jerry-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.sw-jerry-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sw-jerry-messages {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.sw-jerry-bubble {
    background: #334155;
    border-radius: 2px 12px 12px 12px;
    padding: 0.85rem 1rem;
    color: #f1f5f9;
    font-size: 0.9rem;
    line-height: 1.5;
}

.sw-jerry-followup {
    color: #94a3b8;
    font-size: 0.8rem;
    padding: 0.65rem 1rem;
}

/* ============================================
   ANSWER AREA
   ============================================ */

.sw-answer-area {
    padding-left: 3rem; /* Align under jerry messages, past avatar */
    margin-bottom: 0.5rem;
}

/* ============================================
   CHOICE OPTIONS (Radio-like)
   ============================================ */

.sw-choices {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sw-choice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #334155;
    border: 2px solid #475569;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sw-choice:hover {
    border-color: #64748b;
    background: #3b4a63;
}

.sw-choice.selected {
    background: rgba(59, 130, 246, 0.12);
    border-color: #3b82f6;
}

.sw-choice-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.sw-choice-text {
    flex: 1;
    min-width: 0;
}

.sw-choice-title {
    color: #f1f5f9;
    font-weight: 600;
    font-size: 0.9rem;
}

.sw-choice-desc {
    color: #64748b;
    font-size: 0.75rem;
    margin-top: 0.1rem;
}

.sw-choice-check {
    color: #3b82f6;
    font-size: 0.9rem;
    font-weight: 700;
    min-width: 1rem;
    text-align: center;
}

/* ============================================
   SLIDERS
   ============================================ */

.sw-sliders {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.sw-slider-group {
    /* Single slider with label and endpoints */
}

.sw-slider-label {
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.sw-slider-endpoints {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
}

.sw-slider-endpoints span {
    color: #64748b;
    font-size: 0.7rem;
}

.sw-slider {
    width: 100%;
    accent-color: #3b82f6;
    cursor: pointer;
}

/* Custom range slider styling */
.sw-slider::-webkit-slider-runnable-track {
    height: 6px;
    background: #475569;
    border-radius: 3px;
}

.sw-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    margin-top: -6px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.sw-slider::-moz-range-track {
    height: 6px;
    background: #475569;
    border-radius: 3px;
    border: none;
}

.sw-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

/* ============================================
   CHECKBOXES
   ============================================ */

.sw-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.sw-checkbox {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.sw-checkbox:hover {
    background: rgba(59, 130, 246, 0.05);
}

.sw-checkbox.checked {
    background: rgba(59, 130, 246, 0.1);
}

.sw-checkbox input[type="checkbox"] {
    accent-color: #3b82f6;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.sw-checkbox-label {
    color: #f1f5f9;
    font-size: 0.85rem;
}

/* ============================================
   FEEDBACK CARDS
   ============================================ */

.sw-feedback-area {
    padding-left: 3rem;
    margin-top: 0.5rem;
}

.sw-feedback-card {
    padding: 0.75rem;
    border-radius: 8px;
    margin-top: 0.5rem;
    transition: all 0.2s ease;
}

.sw-feedback-purple {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.sw-feedback-green {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.sw-feedback-blue {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.sw-feedback-teal {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.sw-feedback-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.sw-feedback-purple .sw-feedback-title { color: #a78bfa; }
.sw-feedback-green .sw-feedback-title { color: #34d399; }
.sw-feedback-blue .sw-feedback-title { color: #60a5fa; }
.sw-feedback-teal .sw-feedback-title { color: #22d3ee; }

.sw-feedback-message {
    color: #94a3b8;
    font-size: 0.75rem;
    line-height: 1.4;
}

/* ============================================
   SUMMARY SCREEN
   ============================================ */

.sw-summary-card {
    background: #334155;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.sw-summary-label,
.sw-section-label {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.sw-summary-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #475569;
}

.sw-summary-row-last {
    border-bottom: none;
}

.sw-summary-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.sw-summary-key {
    color: #64748b;
    font-size: 0.8rem;
    min-width: 90px;
    flex-shrink: 0;
}

.sw-summary-value {
    color: #f1f5f9;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Save section */
.sw-save-section {
    margin-bottom: 1rem;
}

.sw-save-label {
    color: #94a3b8;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 0.4rem;
}

.sw-save-input {
    width: 100%;
    box-sizing: border-box;
    background: #334155;
    border: 1px solid #475569;
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    color: #f1f5f9;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.sw-save-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.sw-default-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.85rem;
    cursor: pointer;
    margin-bottom: 1rem;
}

.sw-default-toggle input[type="checkbox"] {
    accent-color: #3b82f6;
}

/* ============================================
   FOOTER / NAVIGATION
   ============================================ */

.sw-footer {
    padding: 0.85rem 1.5rem;
    border-top: 1px solid #475569;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: #1a2332;
}

.sw-footer-summary {
    /* Summary has more complex footer layout */
}

.sw-footer-actions {
    display: flex;
    gap: 0.5rem;
}

.sw-step-indicator {
    color: #64748b;
    font-size: 0.75rem;
}

.sw-nav-btn {
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 500;
}

.sw-back-btn {
    background: transparent;
    color: #94a3b8;
}

.sw-back-btn:hover:not(:disabled) {
    color: #f1f5f9;
}

.sw-back-btn:disabled {
    cursor: default;
    opacity: 0.3;
}

.sw-next-btn {
    background: linear-gradient(135deg, #0ea5e9, #3b82f6);
    color: white;
    font-weight: 600;
}

.sw-next-btn:hover {
    filter: brightness(1.1);
}

.sw-save-btn {
    background: linear-gradient(135deg, #0ea5e9, #3b82f6);
    color: white;
    font-weight: 600;
}

.sw-save-btn:hover {
    filter: brightness(1.1);
}

.sw-skip-btn {
    background: #334155;
    color: #94a3b8;
    border: 1px solid #475569;
}

.sw-skip-btn:hover {
    background: #3b4a63;
}

/* ============================================
   STRATEGY SELECTION MODAL
   ============================================ */

.ss-profiles {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.ss-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: #334155;
    border: 2px solid #475569;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.ss-profile:hover {
    border-color: #64748b;
}

.ss-profile.selected {
    background: rgba(59, 130, 246, 0.12);
    border-color: #3b82f6;
}

.ss-profile-radio {
    flex-shrink: 0;
}

.ss-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #64748b;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.ss-radio.checked {
    border-color: #3b82f6;
    background: #3b82f6;
}

.ss-radio.checked::after {
    content: '✓';
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
}

.ss-profile-info {
    flex: 1;
    min-width: 0;
}

.ss-profile-name {
    color: #f1f5f9;
    font-weight: 600;
    font-size: 0.9rem;
}

.ss-default-badge {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.55rem;
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
    vertical-align: middle;
}

.ss-profile-meta {
    color: #64748b;
    font-size: 0.75rem;
    margin-top: 0.2rem;
}

.ss-edit-btn {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.3rem;
    border-radius: 4px;
    transition: all 0.15s;
}

.ss-edit-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
}

.ss-new-btn {
    width: 100%;
    background: transparent;
    border: 2px dashed #475569;
    border-radius: 8px;
    padding: 0.85rem;
    color: #3b82f6;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.15s;
    margin-bottom: 0.5rem;
}

.ss-new-btn:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.ss-new-icon {
    font-size: 1.2rem;
    font-weight: 300;
}

/* ============================================
   STRATEGY DROPDOWN (Trading Header)
   ============================================ */

.trade-strategy-dropdown {
    position: relative;
}

.trade-strategy-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    color: white;
    font-size: 0.78rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.15s;
    white-space: nowrap;
}

.trade-strategy-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

.trade-strategy-btn .strategy-label {
    opacity: 0.7;
}

.trade-strategy-btn .strategy-name {
    font-weight: 600;
}

.trade-strategy-btn .dropdown-arrow {
    font-size: 0.55rem;
    margin-left: 0.15rem;
    opacity: 0.7;
}

/* Dropdown panel */
.trade-strategy-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 8px;
    width: 270px;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: swFadeIn 0.15s ease-out;
}

.trade-strategy-panel-header {
    font-size: 0.65rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 0.75rem 0.25rem;
}

.trade-strategy-panel-items {
    padding: 0.25rem 0.75rem 0.5rem;
}

.trade-strategy-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.1s;
    margin-bottom: 0.2rem;
}

.trade-strategy-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.trade-strategy-item.active {
    background: rgba(59, 130, 246, 0.15);
}

.trade-strategy-item-check {
    color: #3b82f6;
    font-size: 0.8rem;
    min-width: 1rem;
}

.trade-strategy-item-name {
    color: #f1f5f9;
    font-size: 0.85rem;
    flex: 1;
}

.trade-strategy-panel-footer {
    padding: 0.5rem 0.75rem;
    border-top: 1px solid #475569;
}

.trade-strategy-new-btn {
    width: 100%;
    background: transparent;
    border: 1px dashed #475569;
    border-radius: 6px;
    padding: 0.5rem;
    color: #3b82f6;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
}

.trade-strategy-new-btn:hover {
    border-color: #3b82f6;
}

.trade-strategy-manage-btn {
    width: 100%;
    background: transparent;
    border: none;
    padding: 0.4rem;
    color: #64748b;
    font-size: 0.75rem;
    cursor: pointer;
    margin-top: 0.25rem;
    transition: color 0.15s;
}

.trade-strategy-manage-btn:hover {
    color: #94a3b8;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 600px) {
    .sw-modal-content {
        max-height: 95vh;
        border-radius: 10px;
    }
    
    .sw-body {
        padding: 1rem;
    }
    
    .sw-answer-area {
        padding-left: 0;
    }
    
    .sw-feedback-area {
        padding-left: 0;
    }
    
    .sw-jerry-row {
        flex-direction: column;
    }
    
    .sw-jerry-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .sw-footer-summary {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .sw-footer-actions {
        width: 100%;
    }
    
    .sw-footer-actions .sw-nav-btn {
        flex: 1;
    }
    
    .sw-choice {
        padding: 0.65rem 0.75rem;
    }
    
    .sw-choice-icon {
        font-size: 1.1rem;
    }
}

/* ============================================
   iPad / Tablet
   ============================================ */

@media (min-width: 601px) and (max-width: 1024px) {
    .sw-modal-content {
        max-width: 500px;
    }
}
