/* ========================================================================
   Processes Component - Business Profile Data Collection
   ======================================================================== */

/* CSS Variables */
:root {
    --purple-primary: #8B5FBF;
    --green-primary: #7FB069;
    --text-dark: #1f2937;
    --text-medium: #374151;
    --text-light: #6b7280;
    --bg-gray-light: #f9fafb;
    --border-gray: #e5e7eb;
    --border-gray-dark: #d1d5db;
}

/* ========================================================================
   Main Container
   ======================================================================== */

.processes-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ========================================================================
   Header Section
   ======================================================================== */

.processes-header {
    text-align: center;
    margin-bottom: 40px;
}

.processes-header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--purple-primary) 0%, var(--green-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.processes-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 32px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* ========================================================================
   Completion Meter
   ======================================================================== */

#completion-meter-container {
    max-width: 600px;
    margin: 0 auto;
}

.completion-meter {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 2px solid var(--border-gray);
}

.completion-meter.status-starting {
    border-color: #f59e0b;
}

.completion-meter.status-minimum {
    border-color: var(--green-primary);
}

.completion-meter.status-strong {
    border-color: var(--purple-primary);
}

.completion-meter.status-full {
    border-color: var(--purple-primary);
    background: linear-gradient(135deg, rgba(139, 95, 191, 0.05), rgba(127, 176, 105, 0.05));
}

.meter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.meter-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-medium);
}

.meter-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--purple-primary);
}

.meter-bar {
    height: 12px;
    background: var(--bg-gray-light);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
}

.meter-bar:last-of-type {
    margin-bottom: 12px;
}

.meter-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--purple-primary) 0%, var(--green-primary) 100%);
    transition: width 0.6s ease;
    border-radius: 6px;
}

.meter-bar.ai-meter .meter-fill {
    background: linear-gradient(90deg, #7FB069 0%, #8B5FBF 100%);
}

.meter-status {
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-medium);
    padding-top: 12px;
    border-top: 1px solid var(--border-gray);
}

/* ========================================================================
   Section Navigation
   ======================================================================== */

.processes-nav {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-gray-dark) transparent;
}

.processes-nav::-webkit-scrollbar {
    height: 6px;
}

.processes-nav::-webkit-scrollbar-track {
    background: transparent;
}

.processes-nav::-webkit-scrollbar-thumb {
    background: var(--border-gray-dark);
    border-radius: 3px;
}

.section-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: white;
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.section-nav-item:hover {
    border-color: var(--border-gray-dark);
    background: var(--bg-gray-light);
}

.section-nav-item.current {
    border-color: var(--purple-primary);
    background: linear-gradient(135deg, rgba(139, 95, 191, 0.1), rgba(127, 176, 105, 0.1));
    box-shadow: 0 2px 8px rgba(139, 95, 191, 0.2);
}

.section-nav-item.completed {
    border-color: var(--border-gray);
    background: white;
}

.section-nav-item.completed.current {
    border-color: var(--purple-primary);
    background: linear-gradient(135deg, rgba(139, 95, 191, 0.1), rgba(127, 176, 105, 0.1));
    box-shadow: 0 2px 8px rgba(139, 95, 191, 0.2);
}

.section-icon {
    font-size: 20px;
    line-height: 1;
}

.section-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-medium);
}

.check-mark {
    color: var(--green-primary);
    font-size: 16px;
    font-weight: 600;
}

.required-indicator {
    color: #ef4444;
    font-size: 12px;
    position: absolute;
    top: 4px;
    right: 4px;
}

/* ========================================================================
   Section Content
   ======================================================================== */

.processes-content {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    min-height: 400px;
}

.section-content {
    max-width: 800px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.required-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #fef3c7;
    color: #92400e;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.optional-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-gray-light);
    color: var(--text-light);
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================================================
   Form Fields
   ======================================================================== */

.section-form {
    margin-bottom: 24px;
}

.form-field {
    margin-bottom: 24px;
}

.form-field label {
    display: block;
    font-weight: 500;
    color: var(--text-medium);
    margin-bottom: 8px;
    font-size: 15px;
}

.required-star {
    color: #ef4444;
    margin-left: 4px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: white;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--purple-primary);
    box-shadow: 0 0 0 3px rgba(139, 95, 191, 0.1);
}

.form-textarea {
    resize: vertical;
    line-height: 1.5;
}

.form-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 20px;
    padding-right: 40px;
    appearance: none;
}

.input-with-prefix {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    left: 16px;
    font-weight: 500;
    color: var(--text-light);
    pointer-events: none;
}

.form-input.with-prefix {
    padding-left: 32px;
}

.field-help {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.4;
}

.char-guide {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-light);
    font-style: italic;
}

.sensitive-field {
    position: relative;
}

.sensitive-field::after {
    content: '🔒';
    position: absolute;
    top: 0;
    right: 0;
    font-size: 12px;
    opacity: 0.5;
}

/* ========================================================================
   Section Help
   ======================================================================== */

.section-help {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(139, 95, 191, 0.05), rgba(127, 176, 105, 0.05));
    border-left: 4px solid var(--purple-primary);
    border-radius: 8px;
    margin-top: 24px;
}

.help-icon {
    font-size: 20px;
    line-height: 1;
    margin: 0;
}

.help-text {
    flex: 1;
    margin: 0;
    font-size: 14px;
    color: var(--text-medium);
    line-height: 1.6;
}

/* ========================================================================
   Trust Video Section (Welcome Dialog)
   ======================================================================== */

.trust-video-section {
    text-align: center;
}

.trust-video-content {
    max-width: 700px;
    margin: 0 auto;
}

.intro-text {
    font-size: 16px;
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: 32px;
}

/* Override any conflicting .video-placeholder styles with higher specificity */
.trust-video-section .video-placeholder {
    background: white;
    border: 3px solid var(--purple-primary);
    border-radius: 12px;
    padding: 40px 32px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(139, 95, 191, 0.15);
    height: auto;
    display: block;
    cursor: default;
    transition: none;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.trust-video-section .video-placeholder:hover {
    transform: none;
}

.placeholder-icon {
    font-size: 64px;
    margin-bottom: 16px;
    line-height: 1;
}

.trust-video-section .video-placeholder p {
    margin-bottom: 12px;
    color: var(--text-medium);
    font-size: 15px;
    line-height: 1.5;
}

.trust-video-section .video-placeholder p strong {
    color: var(--text-dark);
    font-size: 18px;
}

.video-subtitle {
    font-size: 14px;
    color: var(--text-light);
    font-style: italic;
}

.video-points {
    text-align: left;
    max-width: 520px;
    margin: 32px auto 0;
    background: linear-gradient(135deg, rgba(139, 95, 191, 0.05), rgba(127, 176, 105, 0.05));
    padding: 20px 24px;
    border-radius: 8px;
    border-left: 4px solid var(--purple-primary);
}

.video-points p {
    font-weight: 600;
    margin: 0 0 16px 0;
    color: var(--text-dark);
    font-size: 15px;
}

.video-points ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.video-points li {
    padding: 10px 0 10px 32px;
    position: relative;
    line-height: 1.6;
    color: var(--text-medium);
    font-size: 14px;
    border-bottom: 1px solid rgba(139, 95, 191, 0.1);
}

.video-points li:last-child {
    border-bottom: none;
}

.video-points li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 10px;
    color: var(--green-primary);
    font-weight: 700;
    font-size: 16px;
    width: 24px;
    height: 24px;
    background: rgba(127, 176, 105, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skip-option {
    margin-top: 24px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-medium);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ========================================================================
   Navigation Actions
   ======================================================================== */

.processes-actions {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
}

.btn-primary,
.btn-secondary {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--purple-primary) 0%, var(--green-primary) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(139, 95, 191, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 95, 191, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--text-medium);
    border: 2px solid var(--border-gray);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-gray-light);
    border-color: var(--border-gray-dark);
}

.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ========================================================================
   Completion Screen
   ======================================================================== */

.completion-screen {
    text-align: center;
    padding: 48px 32px;
}

.completion-icon {
    font-size: 80px;
    margin-bottom: 24px;
    animation: celebrate 0.6s ease;
}

@keyframes celebrate {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.completion-screen h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.completion-message {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto 32px;
}

.completion-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-bottom: 40px;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 3rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--purple-primary) 0%, var(--green-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
}

.completion-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ========================================================================
   Responsive Design
   ======================================================================== */

@media (max-width: 768px) {
    .processes-container {
        padding: 24px 16px;
    }

    .processes-header h1 {
        font-size: 1.5rem;
    }

    .processes-subtitle {
        font-size: 1rem;
    }

    .processes-nav {
        gap: 8px;
    }

    .section-nav-item {
        padding: 10px 12px;
    }

    .section-name {
        font-size: 13px;
    }

    .processes-content {
        padding: 24px 20px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .section-header h2 {
        font-size: 1.25rem;
    }

    .processes-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .completion-stats {
        flex-direction: column;
        gap: 24px;
    }

    .stat-value {
        font-size: 2rem;
    }

    .completion-actions {
        flex-direction: column;
    }

    .completion-actions button {
        width: 100%;
    }

    .meter-value {
        font-size: 16px;
    }

    /* Welcome dialog mobile adjustments */
    .trust-video-section .video-placeholder {
        padding: 32px 20px;
        max-width: 100%;
        border-width: 2px;
    }

    .trust-video-content {
        max-width: 100%;
    }

    .placeholder-icon {
        font-size: 48px;
    }

    .trust-video-section .video-placeholder p strong {
        font-size: 16px;
    }

    .video-points {
        max-width: 100%;
        padding: 16px 20px;
        margin: 24px auto 0;
    }

    .video-points li {
        padding: 8px 0 8px 28px;
        font-size: 13px;
    }

    .video-points li::before {
        width: 20px;
        height: 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .section-nav-item .section-name {
        display: none;
    }

    .section-nav-item {
        min-width: 48px;
        justify-content: center;
    }

    .completion-meter {
        padding: 16px;
    }

    .meter-label {
        font-size: 13px;
    }
}

/* ========================================================================
   Loading States
   ======================================================================== */

.processes-content.loading {
    opacity: 0.6;
    pointer-events: none;
}

.processes-content.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid var(--border-gray);
    border-top-color: var(--purple-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================================================
   Accessibility
   ======================================================================== */

.form-input:invalid,
.form-textarea:invalid,
.form-select:invalid {
    border-color: #ef4444;
}

.form-input:invalid:focus,
.form-textarea:invalid:focus,
.form-select:invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Focus visible for keyboard navigation */
.section-nav-item:focus-visible {
    outline: 2px solid var(--purple-primary);
    outline-offset: 2px;
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible {
    outline: 2px solid var(--purple-primary);
    outline-offset: 2px;
}

/* Toast Notifications */
.processes-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    max-width: 400px;
}

.processes-toast.toast-show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    background: #10b981;
    color: white;
}

.toast-error .toast-icon {
    background: #ef4444;
    color: white;
}

.toast-message {
    font-size: 14px;
    color: var(--text-dark);
    line-height: 1.4;
}

/* Mobile responsive toast */
@media (max-width: 768px) {
    .processes-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}
