.conversational-form * {
    box-sizing: border-box;
}

.conversational-form {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    width: 100%;
    max-width: 100%;
    /*background: linear-gradient(135deg, #FFE0B2 0%, #FFEB3B 50%, #fff 100%);*/
    position: relative;
    overflow: hidden;
    border-radius: 50px 50px 20px 20px;
    box-shadow:
            0 0 0 8px rgba(255,255,255,0.8),
            0 0 0 16px rgba(255,255,255,0.6),
            0 0 0 24px rgba(255,255,255,0.4),
            0 10px 30px rgba(0,0,0,0.1),
            0 20px 60px rgba(0,0,0,0.05);
    transition: all 0.8s ease;
}


/* Decorative clouds */
.conversational-form::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 20%;
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    box-shadow:
            40px 0 0 -10px rgba(255,255,255,0.8),
            80px 10px 0 -15px rgba(255,255,255,0.7),
            -30px 15px 0 -5px rgba(255,255,255,0.8);
    z-index: 1;
    animation: floatCloud1 6s ease-in-out infinite;
}

.conversational-form::after {
    content: '';
    position: absolute;
    top: -15px;
    right: 15%;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    box-shadow:
            30px 5px 0 -5px rgba(255,255,255,0.7),
            -20px 10px 0 0px rgba(255,255,255,0.6);
    z-index: 1;
    animation: floatCloud2 8s ease-in-out infinite;
}

@keyframes floatCloud1 {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    50% { transform: translateY(-10px) translateX(5px); }
}

@keyframes floatCloud2 {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    50% { transform: translateY(-8px) translateX(-3px); }
}

/* Collapse helper to fully remove from layout */
.is-hidden {
    display: none !important;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
    border-radius: 50px 50px 20px 20px;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #FFE0B2;
    border-top: 4px solid #FF1293;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}


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

.loading-text {
    color: #FF1293;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
}


/* Results Container - keep out of layout initially */
#resultsContainer {
    position: relative;
    z-index: 4;
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px);
    transition: all 0.8s ease;
    display: none;
}

#resultsContainer.fade-in {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: block;
}

/* Form Container */
#formContainer {
    position: relative;
    z-index: 3;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.8s ease;
}

#formContainer.fade-out {
    opacity: 0;
    transform: translateY(-30px);
}

/* Header used in form UI */
.cloud-header {
    background: linear-gradient(135deg, #FF1293 0%, #212121 100%);
    color: white;
    padding: 20px 25px 15px;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 50px 50px 0 0;
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}


.cloud-icon {
    font-size: 28px;
    filter: drop-shadow(0 2px 4px rgba(255,255,255,0.3));
}

/* Form (chat) specific styles */
.progress-cloud {
    height: 6px;
    background: rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
    border-radius: 3px;
    margin: 0 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00E5FF 0%, #FF1293 100%);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

.step-indicator {
    text-align: center;
    padding: 10px 20px;
    font-size: 12px;
    color: #FF1293;
    font-weight: 500;
    background: rgba(255,255,255,0.5);
}


.chat-messages {
    padding: 25px 30px;
    min-height: 350px;
    max-height: 600px;
    overflow-y: auto;
    background: transparent;
    position: relative;
    z-index: 2;
}

.message {
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    animation: cloudFloat 0.6s ease forwards;
}

@keyframes cloudFloat {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.bot-message {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.bot-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #FF1293 0%, #212121 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow:
            0 4px 15px rgba(255, 18, 147, 0.3),
            inset 0 1px 0 rgba(255,255,255,0.3);
    border: 2px solid rgba(255,255,255,0.8);
}

.bot-bubble {
    background: rgba(255,255,255,0.95);
    padding: 16px 20px;
    border-radius: 25px 25px 25px 8px;
    max-width: calc(100% - 55px);
    line-height: 1.5;
    font-size: 15px;
    color: #212121;
    box-shadow:
            0 8px 25px rgba(0,0,0,0.08),
            0 3px 10px rgba(0,0,0,0.05),
            inset 0 1px 0 rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.8);
    position: relative;
}


.bot-bubble::before {
    content: '';
    position: absolute;
    left: -8px;
    bottom: 15px;
    width: 16px;
    height: 16px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.8);
}

.user-message {
    display: flex;
    justify-content: flex-end;
}

.user-bubble {
    background: linear-gradient(135deg, #00E5FF 0%, #FF1293 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 25px 25px 8px 25px;
    max-width: 75%;
    line-height: 1.5;
    font-size: 15px;
    box-shadow:
            0 8px 25px rgba(0, 229, 255, 0.3),
            0 3px 10px rgba(0, 229, 255, 0.2),
            inset 0 1px 0 rgba(255,255,255,0.2);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}


.typing-indicator {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(20px);
}

.typing-indicator.show {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease;
}

.typing-bubble {
    background: rgba(255,255,255,0.95);
    padding: 16px 20px;
    border-radius: 25px 25px 25px 8px;
    box-shadow:
            0 8px 25px rgba(0,0,0,0.08),
            0 3px 10px rgba(0,0,0,0.05),
            inset 0 1px 0 rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.8);
    position: relative;
}

.typing-bubble::before {
    content: '';
    position: absolute;
    left: -8px;
    bottom: 15px;
    width: 16px;
    height: 16px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.8);
}

.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #FF1293 0%, #212121 100%);
    border-radius: 50%;
    animation: cloudBounce 1.4s infinite;
    box-shadow: 0 2px 4px rgba(255, 18, 147, 0.3);
}


.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes cloudBounce {
    0%, 60%, 100% {
        transform: translateY(0) scale(0.8);
        opacity: 0.6;
    }
    30% {
        transform: translateY(-12px) scale(1);
        opacity: 1;
    }
}

.input-container {
    padding: 20px 30px 25px;
    background: rgba(255,255,255,0.7);
    border-radius: 0 0 20px 20px;
    position: relative;
    z-index: 2;
}

.input-group {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.form-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid rgba(255,255,255,0.8);
    border-radius: 25px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    resize: none;
    min-height: 50px;
    max-height: 120px;
    font-family: inherit;
    background: rgba(255,255,255,0.95);
    color: #212121;
    box-shadow:
            inset 0 2px 5px rgba(0,0,0,0.05),
            0 0 0 0 rgba(0, 229, 255, 0);
}

.form-input:focus {
    border-color: #00E5FF;
    box-shadow:
            inset 0 2px 5px rgba(0,0,0,0.05),
            0 0 0 4px rgba(0, 229, 255, 0.2);
    background: rgba(255,255,255,1);
}

.form-input::placeholder { color: #00E5FF; }

.send-btn {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #FF1293 0%, #212121 100%);
    border: 2px solid rgba(255,255,255,0.8);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow:
            0 6px 20px rgba(255, 18, 147, 0.3),
            inset 0 1px 0 rgba(255,255,255,0.3);
}

.send-btn:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.05);
    box-shadow:
            0 8px 25px rgba(255, 18, 147, 0.4),
            inset 0 1px 0 rgba(255,255,255,0.3);
}


.send-btn:disabled {
    background: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow:
            0 2px 8px rgba(0,0,0,0.1),
            inset 0 1px 0 rgba(255,255,255,0.3);
}

.options-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    animation: cloudOptionsFloat 0.6s ease forwards;
}

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

.option-btn {
    background: rgba(255,255,255,0.9);
    border: 2px solid rgba(0, 229, 255, 0.5);
    padding: 12px 18px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #212121;
    font-family: inherit;
    font-weight: 500;
    box-shadow:
            0 4px 15px rgba(0,0,0,0.05),
            inset 0 1px 0 rgba(255,255,255,0.8);
}

.option-btn:hover {
    background: linear-gradient(135deg, #FF1293 0%, #212121 100%);
    color: white;
    border-color: #FF1293;
    transform: translateY(-2px);
    box-shadow:
            0 6px 20px rgba(255, 18, 147, 0.3),
            inset 0 1px 0 rgba(255,255,255,0.2);
}

.option-btn.selected {
    background: linear-gradient(135deg, #00E5FF 0%, #FF1293 100%);
    color: white;
    border-color: #00E5FF;
}

.multi-select-note {
    font-size: 12px;
    color: #FF1293;
    margin-top: 8px;
    font-style: italic;
}


/* Results UI */
.results-header {
    background: linear-gradient(135deg, #00E5FF 0%, #FF1293 100%);
    color: white;
    padding: 25px 30px;
    text-align: center;
    border-radius: 50px 50px 0 0;
    position: relative;
    z-index: 2;
}


.results-header h1 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
}

.results-header p {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

.user-summary {
    background: rgba(255,255,255,0.95);
    margin: 20px 25px;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.8);
}

.user-summary h3 {
    color: #212121;
    margin: 0 0 15px 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}


.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.summary-item {
    background: #FFE0B2;
    padding: 12px 15px;
    border-radius: 12px;
    border-left: 4px solid #FF1293;
}

.summary-item strong {
    color: #212121;
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}


.results-content {
    padding: 0 25px 25px;
}

.pathway-section {
    background: rgba(255,255,255,0.95);
    margin-bottom: 25px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.8);
}

.pathway-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, #FF1293 0%, #FF1293 100%);
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
}


.pathway-icon {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.pathway-title { flex: 1; }

.pathway-title h3 {
    margin: 0 0 5px 0;
    font-size: 20px;
}

.pathway-title p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.pathway-content { padding: 25px; }

.opportunity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.opportunity-card {
    background: #FFE0B2;
    border-radius: 15px;
    padding: 20px;
    border-left: 4px solid #00E5FF;
    transition: all 0.3s ease;
}


.opportunity-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.opportunity-card h4 {
    margin: 0 0 10px 0;
    color: #212121;
    font-size: 16px;
}


.opportunity-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
}

.meta-tag {
    background: #FFEB3B;
    color: #212121;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}


.opportunity-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 10px 0;
}

.opportunity-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #FF1293 0%, #212121 100%);
    color: white;
}

.btn-secondary {
    background: white;
    color: #FF1293;
    border: 1px solid #FF1293;
}


.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.action-plan {
    background: linear-gradient(135deg, #FFEB3B 0%, #FFE0B2 100%);
    color: #212121;
    padding: 25px;
    border-radius: 20px;
    margin: 25px 0;
    text-align: center;
}


.action-plan h3 { margin: 0 0 15px 0; font-size: 20px; }

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-action {
    background: white;
    color: #212121;
    padding: 12px 24px;
    border-radius: 25px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}


.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* Print styles */
@media print {
    .conversational-form { box-shadow: none; border-radius: 0; }
    .conversational-form::before, .conversational-form::after { display: none; }
    .btn-action, .opportunity-actions, .input-container { display: none; }
    .pathway-section { break-inside: avoid; margin-bottom: 20px; }
}

/* Responsive */
@media (max-width: 768px) {
    .conversational-form { border-radius: 30px 30px 15px 15px; }
    .chat-messages { padding: 20px 20px; min-height: 300px; }
    .input-container { padding: 15px 20px 20px; }
    .bot-bubble, .user-bubble { max-width: 85%; font-size: 14px; }
    .cloud-header { padding: 15px 20px 12px; font-size: 16px; }
    .options-container { gap: 8px; }
    .option-btn { font-size: 13px; padding: 10px 15px; }
    .results-header { padding: 20px; }
    .results-header h1 { font-size: 20px; }
    .results-content { padding: 0 15px 20px; }
    .user-summary, .pathway-content { padding: 15px; }
    .summary-grid { grid-template-columns: 1fr; }
    .opportunity-grid { grid-template-columns: 1fr; }
    .action-buttons { flex-direction: column; align-items: center; }
}