/* CSS Variables */
:root {
    --bg-color: #f8f9f9;
    --primary-orange: #f59e0b;
    --black: #000000;
    --white: #ffffff;
    --gray-light: #e5e7eb;
    --gray-medium: #9ca3af;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--black);
    min-height: 100vh;
    line-height: 1.6;
}

body.scroll-locked {
    overflow: hidden;
    touch-action: none;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 70px 20px 20px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    padding: 30px 20px;
    margin-bottom: 20px;
}

.header-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 10px;
}

.header-subtitle {
    font-size: 1.1rem;
    color: var(--gray-medium);
    font-weight: 400;
}

/* Info Card */
.info-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.info-card-header {
    background: var(--black);
    color: var(--white);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-card-icon {
    width: 28px;
    height: 28px;
    background: var(--primary-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.info-card-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
}

.info-card-content {
    padding: 20px 24px;
}

.info-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-light);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 500;
    color: var(--gray-medium);
    min-width: 140px;
    font-size: 0.9rem;
}

.info-value {
    color: var(--black);
    flex: 1;
}

/* Progress Bar - Fixed at top */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 12px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 1000;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--gray-light);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: var(--progress, 0%);
    background: var(--primary-orange);
    border-radius: 4px;
    transition: width 0.4s ease;
}

.progress-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-medium);
    min-width: 100px;
    text-align: right;
}

/* Chat Container - Frameless */
.chat-container {
    flex: 1;
    background: transparent;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.chat-messages {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Chat Messages */
.message {
    max-width: 80%;
    animation: fadeIn 0.3s ease;
}

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

.message-bot {
    align-self: flex-start;
}

.message-user {
    align-self: flex-end;
}

.message-content {
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 1rem;
    line-height: 1.5;
}

.message-bot .message-content {
    background: var(--gray-light);
    color: var(--black);
    border-bottom-left-radius: 4px;
}

.message-user .message-content {
    background: var(--primary-orange);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

/* Links in messages */
.message-content a {
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: 500;
}

.message-content a:hover {
    text-decoration: underline;
}

.message-bot .message-content a {
    color: var(--primary-orange);
}

/* Typing Indicator - reduced bounce */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 14px 18px;
    background: var(--gray-light);
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    width: fit-content;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--gray-medium);
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}

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

@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

/* Input Area */
.input-area {
    background: var(--bg-color);
    padding: 16px 0;
}

/* Text Input Row - iMessage style */
.input-row-imessage {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    padding-right: 4px;
}

.input-row-imessage .text-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--gray-light);
    border-radius: 20px;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    background: var(--white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, height 0.1s ease;
    resize: none;
    max-height: 150px;
    min-height: 44px;
    line-height: 1.4;
    overflow-y: hidden;
    overflow-x: hidden;
}

.input-row-imessage .text-input:focus {
    overflow-y: auto;
}

.input-row-imessage textarea.text-input {
    height: 44px;
}

.input-row-imessage .text-input::placeholder {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.input-row-imessage .text-input:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.1);
}

.input-row-imessage .text-input::placeholder {
    color: var(--gray-medium);
}

/* Send Arrow Button - iMessage style */
.send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-orange);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.send-btn:hover {
    background: #e88f00;
    transform: scale(1.05);
}

.send-btn:active {
    transform: scale(0.95);
}

.send-btn:disabled {
    background: var(--gray-light);
    cursor: not-allowed;
    transform: none;
}

.send-btn svg {
    width: 18px;
    height: 18px;
    color: var(--white);
}

/* Text Input (legacy style for textareas in special inputs) */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-group label {
    font-weight: 500;
    color: var(--black);
    font-size: 0.95rem;
}

.text-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.text-input:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.text-input::placeholder {
    color: var(--gray-medium);
}

textarea.text-input {
    min-height: 100px;
    resize: vertical;
}

/* Submit Button */
.submit-btn {
    background: var(--primary-orange);
    color: var(--white);
    border: none;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.submit-btn:hover {
    background: #e88f00;
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    background: var(--gray-medium);
    cursor: not-allowed;
    transform: none;
}

.submit-btn svg {
    width: 18px;
    height: 18px;
}

/* Button Group */
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.option-btn {
    background: var(--white);
    color: var(--black);
    border: 2px solid var(--gray-light);
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-btn:hover {
    border-color: var(--primary-orange);
    background: rgba(245, 158, 11, 0.05);
}

.option-btn.selected {
    border-color: var(--primary-orange);
    background: var(--primary-orange);
    color: var(--white);
}

/* Slider Input */
.slider-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.slider-track-wrapper {
    padding: 0 12px;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--gray-medium);
    padding: 0 12px;
}

.slider-input {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--gray-light);
    border-radius: 4px;
    outline: none;
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--primary-orange);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.slider-value {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-orange);
}

/* Team Member Entry */
.team-entry-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.team-member-card {
    background: var(--white);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid var(--gray-light);
}

.team-member-card .input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.team-member-card .input-row.full {
    grid-template-columns: 1fr;
}

.team-member-card input {
    padding: 10px 14px;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Roboto', sans-serif;
}

.team-member-card input:focus {
    outline: none;
    border-color: var(--primary-orange);
}

.team-member-card input.error {
    border-color: #ef4444;
}

.remove-btn {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 0.85rem;
    cursor: pointer;
    align-self: flex-end;
    padding: 4px 8px;
}

.remove-btn:hover {
    text-decoration: underline;
}

.add-member-btn {
    background: var(--primary-orange);
    border: none;
    color: var(--white);
    padding: 14px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-member-btn:hover {
    background: #e88f00;
}

/* Skip button - subtle styling */
.skip-btn {
    background: transparent;
    color: var(--gray-medium);
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.skip-btn:hover {
    color: var(--black);
    background: var(--gray-light);
}

/* Scheduling Cards (1:1 booking) */
.scheduling-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scheduling-card {
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scheduling-card-top {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.scheduling-pfp {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.scheduling-card-info {
    flex: 1;
}

.scheduling-card-info strong {
    font-size: 1.1rem;
    color: var(--black);
    display: block;
    margin-bottom: 4px;
}

.scheduling-card-desc {
    font-size: 0.9rem;
    color: var(--gray-medium);
    margin: 0;
    line-height: 1.4;
}

.scheduling-book-btn {
    display: inline-block;
    background: var(--primary-orange);
    color: var(--white);
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
}

.scheduling-book-btn:hover {
    background: #e88f00;
    transform: translateY(-1px);
}

/* Completion Screen */
.completion-container {
    text-align: center;
    padding: 40px 20px;
    animation: slideUpFade 0.6s ease-out;
}

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

/* Fade out animation for chat when completing */
.chat-fade-out {
    animation: fadeOutUp 0.4s ease-out forwards;
}

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

.completion-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 40px;
    color: var(--white);
}

.completion-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 12px;
}

.completion-message {
    color: var(--gray-medium);
    font-size: 1.1rem;
    margin-bottom: 24px;
    line-height: 1.6;
}

.completion-checklist {
    text-align: left;
    background: var(--bg-color);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.completion-checklist h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--black);
}

.completion-checklist ul {
    list-style: none;
}

.completion-checklist li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--black);
}

.completion-checklist li::before {
    content: '✓';
    width: 20px;
    height: 20px;
    background: var(--primary-orange);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .container {
        padding: 60px 12px 12px 12px;
    }

    .header {
        padding: 16px 12px;
    }

    .header-title {
        font-size: 1.5rem;
    }

    .header-subtitle {
        font-size: 0.9rem;
    }

    .info-card-content {
        padding: 16px;
    }

    .info-row {
        flex-direction: column;
        gap: 4px;
    }

    .info-label {
        min-width: unset;
    }

    .chat-messages {
        padding: 12px 8px;
    }

    .message {
        max-width: 92%;
    }

    .message-content {
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    .input-area {
        padding: 10px 8px;
    }

    .input-row-imessage {
        gap: 8px;
        padding-right: 2px;
    }

    .input-row-imessage .text-input {
        padding: 10px 14px;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    .send-btn {
        width: 40px;
        height: 40px;
    }

    .send-btn svg {
        width: 16px;
        height: 16px;
    }

    .team-member-card .input-row {
        grid-template-columns: 1fr;
    }

    .team-member-card input {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    .button-group {
        flex-direction: column;
    }

    .option-btn {
        width: 100%;
        text-align: center;
    }

    .slider-container {
        gap: 12px;
    }

    .slider-value {
        font-size: 1.5rem;
    }

    .submit-btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .skip-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    .add-member-btn {
        padding: 12px;
        font-size: 0.9rem;
    }

    .progress-container {
        padding: 10px 16px;
    }

    .progress-text {
        font-size: 0.8rem;
        min-width: 80px;
    }

    .completion-container {
        padding: 30px 16px;
    }

    .completion-icon {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }

    .completion-title {
        font-size: 1.4rem;
    }

    .completion-message {
        font-size: 1rem;
    }

    .scheduling-card {
        padding: 14px;
    }

    .scheduling-pfp {
        width: 48px;
        height: 48px;
    }

    .scheduling-card-info strong {
        font-size: 1rem;
    }

    .scheduling-card-desc {
        font-size: 0.85rem;
    }

    .scheduling-book-btn {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
}
