/* CashCow Onboarding Wizard Styles */

.cashcow-wizard {
    max-width: 650px;
    margin: 0 auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    position: relative;
    overflow: hidden;
}

/* Progress Bar */
.wizard-progress {
    margin-bottom: 50px;
}

.progress-bar {
    height: 8px;
    background: #f1f3f4;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 25px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #ec4899 0%, #ef4444 100%);
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* Progress Steps - Fixed for 7 steps */
.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
}

.progress-steps .step {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #f1f3f4;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.4s ease;
    position: relative;
    border: 2px solid transparent;
    flex-shrink: 0;
    z-index: 10;
}

.progress-steps .step.active {
    background: linear-gradient(135deg, #ec4899 0%, #ef4444 100%);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
    z-index: 20;
}

.progress-steps .step.completed {
    background: #10b981;
    color: white;
    border-color: #10b981;
    z-index: 15;
}

.progress-steps .step {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #f1f3f4;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.4s ease;
    position: relative;
    border: 3px solid transparent;
}

.progress-steps .step.active {
    background: linear-gradient(135deg, #ec4899 0%, #ef4444 100%);
    color: white;
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.3);
}

.progress-steps .step.completed {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

/* Form Styles */
.wizard-form {
    position: relative;
}

.wizard-step {
    display: none;
    animation: fadeInUp 0.6s ease forwards;
}

.wizard-step.active {
    display: block;
}

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

.step-content {
    margin-bottom: 40px;
}

.step-content h3 {
    font-size: 32px;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.step-content p {
    font-size: 18px;
    color: #6b7280;
    margin: 0 0 35px 0;
    line-height: 1.6;
}

/* Form Groups */
.form-group {
    margin-bottom: 30px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 20px 24px;
    border: 3px solid #e5e7eb;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #f9fafb;
    box-sizing: border-box;
    color: #1f2937;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ec4899;
    background: #ffffff;
    box-shadow: 0 0 0 6px rgba(236, 72, 153, 0.1);
    transform: translateY(-2px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
    font-family: inherit;
}

.help-text {
    display: block;
    font-size: 15px;
    color: #6b7280;
    margin-top: 10px;
    font-weight: 500;
}

/* Radio Group */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 24px;
    border: 3px solid #e5e7eb;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9fafb;
    position: relative;
    overflow: hidden;
}

.radio-option:hover {
    border-color: #ec4899;
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: #ec4899;
    background: #ec4899;
    box-shadow: 0 0 0 6px rgba(236, 72, 153, 0.2);
}

.radio-option input[type="radio"]:checked ~ .radio-label {
    color: #1f2937;
}

.radio-custom {
    width: 28px;
    height: 28px;
    border: 3px solid #d1d5db;
    border-radius: 50%;
    margin-right: 20px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
}

.radio-label {
    flex: 1;
}

.radio-label strong {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #374151;
    line-height: 1.3;
}

/* Navigation Buttons */
.step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 50px;
    gap: 20px;
}

.btn-prev,
.btn-next,
.btn-submit,
.btn-close {
    padding: 18px 36px;
    border: none;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    min-height: 56px;
    position: relative;
    overflow: hidden;
}

.btn-prev {
    background: #f3f4f6;
    color: #6b7280;
    border: 3px solid #e5e7eb;
}

.btn-prev:hover {
    background: #ffffff;
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.btn-next,
.btn-submit {
    background: linear-gradient(135deg, #ec4899 0%, #ef4444 100%);
    color: white;
    margin-left: auto;
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn-next::before,
.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f472b6 0%, #f87171 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-next:hover::before,
.btn-submit:hover::before {
    left: 0;
}

.btn-next:hover,
.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(236, 72, 153, 0.4);
}

.btn-close {
    background: #10b981;
    color: white;
    margin: 30px auto 0;
    border: 3px solid #10b981;
}

.btn-close:hover {
    background: #059669;
    border-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

/* Submit Section */
.submit-section {
    margin: 40px 0 30px;
    text-align: center;
}

.btn-submit {
    position: relative;
    min-width: 240px;
    margin: 0;
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.spinner {
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

.spinner .path {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: 0;
    animation: dash 1.5s ease-in-out infinite;
}

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

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Success Step */
.success-step {
    text-align: center;
}

.success-step .step-content h3 {
    color: #10b981;
    margin-bottom: 20px;
}

.success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 40px;
}

.success-icon svg {
    width: 100%;
    height: 100%;
}

.success-circle {
    stroke: #10b981;
    stroke-width: 3;
    stroke-dasharray: 314;
    stroke-dashoffset: 314;
    animation: circle 1s ease-in-out forwards;
}

.success-check {
    stroke: #10b981;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 25;
    stroke-dashoffset: 25;
    animation: check 0.6s ease-in-out 1s forwards;
}

@keyframes circle {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes check {
    to {
        stroke-dashoffset: 0;
    }
}

.success-details {
    font-size: 18px;
    color: #6b7280;
    margin: 20px 0;
    font-weight: 500;
}

/* Error Messages */
.error-message {
    color: #ef4444;
    font-size: 15px;
    font-weight: 600;
    margin-top: 10px;
    display: none;
    padding: 8px 12px;
    background: #fef2f2;
    border-radius: 8px;
    border-left: 4px solid #ef4444;
}

.error-message.show {
    display: block;
}

.wizard-messages {
    margin-top: 30px;
}

.wizard-messages .message {
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
}

.wizard-messages .error {
    background: #fef2f2;
    color: #dc2626;
    border: 2px solid #fecaca;
}

.wizard-messages .success {
    background: #ecfdf5;
    color: #059669;
    border: 2px solid #a7f3d0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cashcow-wizard {
        margin: 15px;
        padding: 25px;
    }
    
    .step-content h3 {
        font-size: 26px;
    }
    
    .step-content p {
        font-size: 16px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .radio-option {
        padding: 20px;
    }
    
    .radio-label strong {
        font-size: 18px;
    }
    
    .step-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-prev,
    .btn-next,
    .btn-submit {
        width: 100%;
        margin: 0;
        min-width: 100%;
    }
    
    .progress-steps .step {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

/* Focus states for accessibility */
.btn-prev:focus,
.btn-next:focus,
.btn-submit:focus,
.btn-close:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.2);
}

.radio-option:focus-within {
    outline: none;
    border-color: #ec4899;
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.1);
}

/* Custom scrollbar for textarea */
.form-group textarea::-webkit-scrollbar {
    width: 8px;
}

.form-group textarea::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 4px;
}

.form-group textarea::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.form-group textarea::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Text center utility */
.text-center {
    text-align: center;
} 
/* Editor Search Animation */
.editor-search-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ec4899;
    border-radius: 50%;
    animation: editorSpin 2s linear infinite;
    margin: 0 auto 20px;
}

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

/* Success Checkmark Animation */
.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #22c55e;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px #22c55e;
    animation: checkmark-fill .4s ease-in-out .4s forwards, checkmark-scale .3s ease-in-out .9s both;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #22c55e;
    fill: none;
    animation: checkmark-stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: checkmark-stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes checkmark-stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes checkmark-scale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes checkmark-fill {
    100% {
        box-shadow: inset 0px 0px 0px 30px #22c55e;
    }
}

/* Matching Phase Styles */
.matching-phase {
    padding: 40px 20px;
}

.matching-phase h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.matching-phase p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

/* Radio option improvements for new question */
.radio-option small {
    display: block;
    color: #888;
    font-size: 14px;
    margin-top: 4px;
    font-weight: normal;
}

/* Button state improvements */
.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-submit .btn-loader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-submit .spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

/* Step navigation for new layout */
.step-navigation {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.step-navigation .btn-prev {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.step-navigation .btn-prev:hover {
    background: #e9ecef;
    color: #333;
}

.step-navigation .btn-next {
    background: linear-gradient(135deg, #ec4899, #ef4444);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.step-navigation .btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}


.progress-steps .step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -50%;
    width: 100%;
    height: 2px;
    background: #e5e7eb;
    transform: translateY(-50%);
    z-index: 1;
}

.progress-steps .step.completed:not(:last-child)::after {
    background: linear-gradient(135deg, #ec4899, #ef4444);
}

/* Enhanced error styling */
.error-message.show {
    animation: errorSlideIn 0.3s ease-out;
}

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

/* Loading animation improvements */
.loading-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .progress-steps {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .progress-steps .step {
        width: calc(100% / 4 - 6px);
        margin-bottom: 8px;
    }
    
    .progress-steps .step:nth-child(n+5) {
        width: calc(100% / 3 - 5px);
    }
    
    .matching-phase {
        padding: 20px 10px;
    }
    
    .editor-search-spinner {
        width: 50px;
        height: 50px;
    }
    
    .success-checkmark,
    .checkmark {
        width: 60px;
        height: 60px;
    }
}

/* Connection lines between steps - Fixed for 7 steps */
.progress-steps .step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    left: calc(100% + 4px);
    width: 8px;
    height: 2px;
    background: #e5e7eb;
    transform: translateY(-50%);
    z-index: 1;
}

.progress-steps .step.completed:not(:last-child)::after {
    background: linear-gradient(135deg, #ec4899, #ef4444);
}

/* Mobile responsive for 7 steps */
@media (max-width: 768px) {
    .progress-steps .step {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .progress-steps .step.active {
        transform: scale(1.05);
    }
    
    .progress-steps {
        gap: 4px;
    }
    
    .progress-steps .step:not(:last-child)::after {
        width: 4px;
        left: calc(100% + 2px);
    }
}

@media (max-width: 480px) {
    .progress-steps {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        margin-top: 10px;
    }
    
    .progress-steps .step {
        width: 28px;
        height: 28px;
        font-size: 11px;
        margin: 2px;
    }
    
    .progress-steps .step:not(:last-child)::after {
        display: none;
    }
}
