/* Toast notification */
#download-toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    background: #1a2746;
    color: #fff;
    padding: 1em 2em;
    border-radius: 2em;
    font-family: 'Lora', serif;
    font-size: 1.1em;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    z-index: 9999;
    transition: opacity 0.3s;
    pointer-events: none;
    max-width: 85vw;
    text-align: center;
    word-break: break-word;
}

@media (max-width: 600px) {
    #download-toast {
        font-size: 1em;
        padding: 0.7em 1.2em;
        bottom: 16px;
    }
}

/* Base styles */
body {
    font-family: var(--font-sans, 'Poppins', Arial, Helvetica, sans-serif);
    margin: 0;
    padding: 0;
    background-color: white;
    min-height: 100vh;
    color: var(--brand-navy, #2e4a70);
}

.wizard {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--brand-offwhite, #f3e9e0);
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(44, 74, 112, 0.08);
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-serif, 'Lora', serif);
    text-align: center;
    margin-bottom: 20px;
    color: var(--brand-blue, #1537bb);
    letter-spacing: 0.01em;
}

h1 {
    font-size: 1.8em;
}

h2 {
    font-size: 1.4em;
    margin: 0 0 20px 0;
}

/* Progress bar */
.wizard-progress {
    margin-bottom: 20px;
}

.progress-bar {
    height: 4px;
    background-color: rgba(46, 74, 112, 0.1);
    /* brand-navy with opacity */
    border-radius: 2px;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background-color: var(--brand-turquoise, #40e0d0);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9em;
    color: #6c757d;
    text-align: center;
}

/* Steps */
.step {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: none;
}

.step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-help {
    font-style: italic;
    color: var(--brand-navy, #2e4a70);
    margin-bottom: 16px;
    font-family: var(--font-sans, 'Poppins', Arial, Helvetica, sans-serif);
    font-size: 1.1em;
}


/* Form elements */
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.rating-group .value-display {
    min-width: 2.5em;
    text-align: right;
    font-weight: 600;
    font-size: 1.1em;
    color: var(--brand-navy, #2e4a70);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

input[type="range"] {
    flex: 1;
    margin: 8px 0;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    position: relative;
}

/* Slider track */
input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    background: rgba(46, 74, 112, 0.1);
    border-radius: 4px;
    border: none;
}

input[type="range"]::-moz-range-track {
    width: 100%;
    height: 8px;
    background: rgba(46, 74, 112, 0.1);
    border-radius: 4px;
    border: none;
}

/* Colored track progress */
input[type="range"].styled-track {
    background: linear-gradient(to right,
            var(--brand-turquoise, #40e0d0) 0%,
            var(--brand-turquoise, #40e0d0) calc(var(--value, 0%) * 1%),
            rgba(46, 74, 112, 0.1) calc(var(--value, 0%) * 1%),
            rgba(46, 74, 112, 0.1) 100%);
    border-radius: 4px;
}

/* Slider thumb */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--brand-turquoise, #40e0d0);
    border: 2px solid white;
    margin-top: -6px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: opacity 0.2s;
    position: relative;
    z-index: 1;
}

input[type="range"]::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--brand-turquoise, #40e0d0);
    border: 2px solid white;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: opacity 0.2s;
    position: relative;
    z-index: 1;
}

/* Hover and focus states */
input[type="range"]:hover::-webkit-slider-thumb,
input[type="range"]:focus::-webkit-slider-thumb {
    opacity: 0.9;
}

input[type="range"]:hover::-moz-range-thumb,
input[type="range"]:focus::-moz-range-thumb {
    opacity: 0.9;
}



textarea {
    width: 100%;
    min-height: 100px;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
}

/* Rating sections */
.rating-section {
    margin-bottom: 20px;
}

.rating-group {
    margin-bottom: 15px;
}

.notes-group {
    margin-top: 20px;
}

/* Buttons and actions */
button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: opacity 0.2s;
}

.info-icon {
    color: var(--brand-navy);
    cursor: pointer;
    margin-left: 5px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    position: relative;
}

.info-icon:hover {
    opacity: 1;
}

.tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--brand-navy);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    width: 250px;
    font-size: 14px;
    line-height: 1.4;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    font-family: var(--font-sans, 'Poppins', Arial, sans-serif);
    text-transform: none;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: var(--brand-navy) transparent transparent transparent;
}

.info-icon.active .tooltip {
    opacity: 1;
    visibility: visible;
}

/* For mobile compatibility */
@media (max-width: 768px) {
    .tooltip {
        width: 200px;
        font-size: 13px;
    }
}

button:hover {
    opacity: 0.9;
}

.button-group {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.action-button {
    background-color: var(--brand-turquoise, #40e0d0);
    color: var(--brand-navy, #2e4a70);
    font-weight: 600;
    border: 2px solid var(--brand-turquoise, #40e0d0);
}

.action-button.next {
    margin-left: auto;
}

.secondary-button {
    background-color: var(--brand-offwhite, #f3e9e0);
    color: var(--brand-navy, #2e4a70);
    border: 1px solid var(--brand-navy, #2e4a70);
    order: -1;
}

/* Share functionality */
.share-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px auto;
    max-width: 600px;
    padding: 15px;
    background: var(--brand-tan, #e3caab);
    border-radius: 8px;
}

.share-container input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}



/* Results page */
.chart-container {
    margin: 20px auto;
    max-width: 600px;
    width: 100%;
    aspect-ratio: 1;
}

.person-name-container {
    margin: -10px 0 30px;
    color: #666;
    width: 100%;
}

.person-name-container--center {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.person-name-container--left {
    display: block;
    text-align: left;
}


.person-name {
    display: inline-block;
    font-size: 1.2em;
    color: var(--brand-pink, #ff3992);
    font-weight: 600;
    width: auto;
    font-family: var(--font-serif, 'Lora', serif);
}


.notes-summary,
.next-steps-section {
    margin-top: 40px;
    padding: 0 20px;
}

.notes-table {
    max-width: 800px;
    margin: 0 auto;
}

.note-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.note-item h4 {
    color: #333;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.note-item .note-text {
    color: #444;
    white-space: pre-wrap;
    line-height: 1.5;
}

.next-steps-section {
    background-color: var(--brand-offwhite, #f3e9e0);
    border-radius: 8px;
    padding: 20px;
    margin-top: 40px;
}

.next-steps-section h3 {
    color: var(--brand-blue, #1537bb);
    margin-top: 0;
}

.next-steps-section p {
    margin-bottom: 15px;
    line-height: 1.6;
}

/* Mobile optimizations */
@media (max-width: 480px) {
    .wizard {
        padding: 10px;
    }

    h1 {
        font-size: 1.5em;
    }

    h2 {
        font-size: 1.2em;
    }

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

    .next-btn {
        margin-left: 0;
    }

    button {
        padding: 12px 20px;
        /* Larger touch targets */
        width: 100%;
    }
}