/* GreyButUseful - Forms & Job Posting Styles */

/* Form Page Layout */
.form-page {
    min-height: 100vh;
    background: var(--bg-cream);
}

.form-page-content {
    padding: 2rem 0 4rem;
}

/* Progress Bar */
.progress-container {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    padding: 1.5rem 0;
}

.progress-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    max-width: 600px;
    margin: 0 auto;
}

.progress-item {
    display: flex;
    align-items: center;
    position: relative;
}

.progress-item:not(:last-child)::after {
    content: '';
    width: 80px;
    height: 3px;
    background: var(--border-light);
    margin: 0 0.5rem;
    border-radius: 2px;
}

.progress-item.completed:not(:last-child)::after {
    background: var(--teal);
}

.progress-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-soft);
    border: 3px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-light);
    position: relative;
    z-index: 1;
}

.progress-item.active .progress-dot {
    background: var(--coral);
    border-color: var(--coral);
    color: white;
    box-shadow: 0 0 0 4px var(--coral-light);
}

.progress-item.completed .progress-dot {
    background: var(--teal);
    border-color: var(--teal);
    color: white;
}

.progress-label {
    position: absolute;
    top: 100%;
    /* Centre on the dot (40px wide), not the whole item — the item also
       contains the connector line via ::after, which would skew left:50%. */
    left: 20px;
    transform: translateX(-50%);
    margin-top: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap;
}

.progress-item.active .progress-label {
    color: var(--coral);
}

.progress-item.completed .progress-label {
    color: var(--teal);
}

/* Form Card */
.form-card {
    background: var(--bg-white);
    border-radius: var(--radius-2xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    max-width: 700px;
    margin: 0 auto;
}

.form-card-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.form-card-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.form-card-header p {
    font-size: 1rem;
}

.form-card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Form Sections */
.form-section {
    margin-bottom: 2rem;
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section-title .icon {
    font-size: 1.25rem;
}

.form-section-hint {
    margin-top: -0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-medium);
}

/* Category Selector */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.category-option {
    position: relative;
}

.category-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.category-option label {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
}

.category-option label:hover {
    border-color: var(--coral);
    background: var(--coral-light);
}

.category-option input:checked + label {
    border-color: var(--coral);
    background: var(--coral-light);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15);
}

.category-option .category-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-soft);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.category-option input:checked + label .category-icon {
    background: var(--coral);
}

.category-option .category-text h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.125rem;
}

.category-option .category-text p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}

/* Character Counter */
.input-wrapper {
    position: relative;
}

.char-counter {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-light);
    background: var(--bg-white);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
}

.char-counter.warning {
    color: var(--warning);
}

.char-counter.error {
    color: var(--error);
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* Budget Range */
.budget-inputs {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.budget-inputs .form-input {
    flex: 1;
}

.budget-separator {
    color: var(--text-light);
    font-weight: 600;
}

/* Toggle Switch */
.toggle-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--bg-soft);
    border-radius: var(--radius-md);
}

.toggle-label {
    font-weight: 600;
    color: var(--text-dark);
}

.toggle-label span {
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-light);
    margin-top: 0.125rem;
}

.toggle {
    position: relative;
    width: 52px;
    height: 28px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border-medium);
    border-radius: 28px;
    transition: var(--transition-base);
}

.toggle-slider::before {
    position: absolute;
    content: '';
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.toggle input:checked + .toggle-slider {
    background: var(--teal);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.form-actions-right {
    display: flex;
    gap: 1rem;
}

/* Draft Saved Notice */
.draft-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.draft-notice.saved {
    color: var(--teal);
}

/* Job Summary Card */
.job-summary {
    background: var(--bg-soft);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.job-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.job-summary h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.job-summary .category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--coral-light);
    color: var(--coral);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
}

.job-summary-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.job-summary-item {
    text-align: center;
    padding: 0.75rem;
    background: var(--bg-white);
    border-radius: var(--radius-md);
}

.job-summary-item .label {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.job-summary-item .value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* Review Page Styles */
.review-section {
    background: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.review-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.review-section-header h3 {
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.review-section-header .edit-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--coral);
}

.review-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
}

.review-item:not(:last-child) {
    border-bottom: 1px solid var(--border-light);
}

.review-item .label {
    width: 120px;
    flex-shrink: 0;
    font-size: 0.85rem;
    color: var(--text-light);
}

.review-item .value {
    flex: 1;
    font-weight: 600;
    color: var(--text-dark);
}

.review-description {
    padding: 1rem;
    background: var(--bg-soft);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-medium);
}

/* What Happens Next */
.next-steps {
    background: var(--teal-light);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
}

.next-steps h3 {
    color: var(--teal-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.next-steps-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.next-step-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.next-step-number {
    width: 24px;
    height: 24px;
    background: var(--teal);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.next-step-text {
    font-size: 0.95rem;
    color: var(--text-medium);
}

/* Success Page */
.success-page {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--teal-light) 0%, var(--bg-cream) 50%);
    display: flex;
    flex-direction: column;
}

.success-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.success-card {
    background: var(--bg-white);
    border-radius: var(--radius-2xl);
    padding: 3rem;
    text-align: center;
    max-width: 600px;
    box-shadow: var(--shadow-lg);
}

.success-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.success-card h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--teal-dark);
}

.success-card > p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.job-reference {
    background: var(--bg-soft);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.job-reference .label {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.job-reference .value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    font-family: monospace;
}

.success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Password Strength */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bars {
    display: flex;
    gap: 4px;
    margin-bottom: 0.375rem;
}

.strength-bar {
    height: 4px;
    flex: 1;
    background: var(--border-light);
    border-radius: 2px;
    transition: var(--transition-base);
}

.strength-bar.active.weak { background: var(--error); }
.strength-bar.active.medium { background: var(--warning); }
.strength-bar.active.good { background: var(--sky); }
.strength-bar.active.strong { background: var(--teal); }

.strength-text {
    font-size: 0.8rem;
    font-weight: 600;
}

.strength-text.weak { color: var(--error); }
.strength-text.medium { color: var(--warning); }
.strength-text.good { color: var(--sky); }
.strength-text.strong { color: var(--teal); }

/* Contact Preferences */
.contact-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-soft);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-base);
}

.contact-option:hover {
    background: var(--coral-light);
}

.contact-option input {
    width: 20px;
    height: 20px;
    accent-color: var(--coral);
}

.contact-option .option-icon {
    font-size: 1.25rem;
}

.contact-option .option-text {
    font-weight: 600;
    color: var(--text-dark);
}

/* File Upload */
.file-upload {
    border: 2px dashed var(--border-medium);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-base);
}

.file-upload:hover {
    border-color: var(--coral);
    background: var(--coral-light);
}

.file-upload-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.file-upload p {
    margin-bottom: 0.5rem;
}

.file-upload .hint {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
    .form-card {
        padding: 1.5rem;
        margin: 0 1rem;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .job-summary-details {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions-right {
        width: 100%;
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    .success-actions {
        flex-direction: column;
    }
    
    .progress-bar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .progress-item::after {
        display: none;
    }
    
    .progress-label {
        position: static;
        transform: none;
        margin-top: 0.25rem;
        margin-left: 0.75rem;
    }
    
    .progress-item {
        flex-direction: row;
        width: 100%;
    }
}
