/* Reset and base styles */
.af-funnel-container {
    max-width: 60rem;
    margin: 0 auto;
    padding: 2rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--clr-black, #000);
    background: var(--clr-white, #fff);
    border-radius: 1rem;
    box-shadow: 0 0.4rem 2rem rgba(0, 0, 0, 0.1);
}

.af-funnel-container * {
    box-sizing: border-box;
}

/* Header */
.af-funnel-header {
    text-align: center;
    margin-bottom: 3rem;
}

.af-funnel-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    color: var(--clr-black, #000);
}

.af-funnel-description {
    font-size: 1.6rem;
    color: var(--clr-grey, #222);
    margin: 0;
    line-height: 1.5;
}

/* Progress bar */
.af-progress-bar {
    width: 100%;
    height: 0.8rem;
    background: #f0f0f0;
    border-radius: 0.4rem;
    margin-bottom: 3rem;
    overflow: hidden;
}

.af-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--clr-black, #000) 0%, var(--clr-grey, #222) 100%);
    border-radius: 0.4rem;
    transition: width 0.4s ease;
    width: 0;
}

/* Form steps */
.af-step {
    min-height: 30rem;
    padding: 2rem 0;
}

.af-field-group {
    margin-bottom: 3rem;
}

.af-field-label {
    display: block;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--clr-black, #000);
}

/* Input styles */
.af-input {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    border: 0.2rem solid #e0e0e0;
    border-radius: 0.8rem;
    background: var(--clr-white, #fff);
    color: var(--clr-black, #000);
    transition: all 0.3s ease;
    font-family: inherit;
}

.af-input:focus {
    outline: none;
    border-color: var(--clr-black, #000);
    box-shadow: 0 0 0 0.3rem rgba(0, 0, 0, 0.1);
}

.af-input.af-error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 0.3rem rgba(231, 76, 60, 0.1);
}

.af-textarea {
    resize: vertical;
    min-height: 12rem;
}

/* Option styles (Radio/Checkbox as buttons) */
.af-options-group {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
}

.af-options-group.af-error {
    border: 0.2rem solid #e74c3c;
    border-radius: 0.8rem;
    padding: 1rem;
}

.af-option-item {
    position: relative;
}

.af-option-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.af-option-label {
    display: block;
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    border: 0.2rem solid #e0e0e0;
    border-radius: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.6rem;
    font-weight: 500;
    text-align: center;
    color: var(--clr-grey, #222);
    margin: 0;
}

.af-option-label:hover {
    background: #f0f1f2;
    border-color: var(--clr-grey, #222);
    transform: translateY(-0.2rem);
    box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.1);
}

.af-option-input:checked + .af-option-label {
    background: var(--clr-black, #000);
    color: var(--clr-white, #fff);
    border-color: var(--clr-black, #000);
    transform: translateY(-0.2rem);
    box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.2);
}

/* Additional fields */
.af-additional-field {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 0.8rem;
    border: 0.1rem solid #e0e0e0;
}

.af-additional-label {
    display: block;
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--clr-grey, #222);
}

.af-additional-textarea,
.af-additional-textline {
    background: var(--clr-white, #fff);
}

/* Buttons */
.af-step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4rem;
    gap: 2rem;
}

.af-btn {
    padding: 1.5rem 3rem;
    font-size: 1.6rem;
    font-weight: 600;
    border: none;
    border-radius: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-family: inherit;
    min-width: 12rem;
}

.af-btn-primary {
    background: var(--clr-black, #000);
    color: var(--clr-white, #fff);
}

.af-btn-primary:hover:not(:disabled) {
    background: var(--clr-grey, #222);
    transform: translateY(-0.2rem);
    box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.2);
}

.af-btn-secondary {
    background: transparent;
    color: var(--clr-grey, #222);
    border: 0.2rem solid var(--clr-grey, #222);
}

.af-btn-secondary:hover:not(:disabled) {
    background: var(--clr-grey, #222);
    color: var(--clr-white, #fff);
    transform: translateY(-0.2rem);
    box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.1);
}

.af-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Calendar step */
.af-calendar-step .af-field-group h3 {
    font-size: 2.4rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--clr-black, #000);
}

.af-calendar-embed {
    min-height: 40rem;
    border-radius: 0.8rem;
    overflow: hidden;
    border: 0.1rem solid #e0e0e0;
}

.af-calendar-embed iframe {
    width: 100%;
    height: 60rem;
    border: none;
}

/* Success step */
.af-success-step {
    text-align: center;
    padding: 4rem 2rem;
}

.af-success-content {
    max-width: 40rem;
    margin: 0 auto;
}

.af-success-icon {
    font-size: 6rem;
    color: #27ae60;
    margin-bottom: 2rem;
    display: inline-block;
    width: 8rem;
    height: 8rem;
    line-height: 8rem;
    border-radius: 50%;
    background: #d5f4e6;
    transition: all 0.5s ease;
    transform: scale(0);
}

.af-success-icon.af-animate-success {
    transform: scale(1);
    animation: af-bounce 0.6s ease;
}

@keyframes af-bounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.af-success-step h3 {
    font-size: 2.8rem;
    color: var(--clr-black, #000);
    margin: 0 0 1.5rem 0;
}

.af-success-step p {
    font-size: 1.8rem;
    color: var(--clr-grey, #222);
    line-height: 1.6;
    margin: 0;
}

/* Error messages */
.af-error-message {
    background: #fee;
    color: #c62d42;
    padding: 1.5rem;
    border-radius: 0.8rem;
    border: 0.1rem solid #f5c2c7;
    margin-bottom: 2rem;
    font-size: 1.4rem;
    font-weight: 500;
}

/* Responsive design */
@media (max-width: 768px) {
    .af-funnel-container {
        padding: 1.5rem;
        margin: 1rem;
        border-radius: 0.8rem;
    }
    
    .af-funnel-title {
        font-size: 2.4rem;
    }
    
    .af-funnel-description {
        font-size: 1.4rem;
    }
    
    .af-options-group {
        grid-template-columns: 1fr;
    }
    
    .af-step-navigation {
        flex-direction: column-reverse;
        gap: 1.5rem;
    }
    
    .af-btn {
        width: 100%;
        padding: 1.2rem 2rem;
        font-size: 1.4rem;
    }
    
    .af-field-label {
        font-size: 1.6rem;
    }
    
    .af-input {
        padding: 1.2rem;
        font-size: 1.4rem;
    }
    
    .af-option-label {
        padding: 1.2rem 1.5rem;
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .af-funnel-container {
        padding: 1rem;
    }
    
    .af-funnel-title {
        font-size: 2rem;
    }
    
    .af-step {
        min-height: 25rem;
        padding: 1.5rem 0;
    }
    
    .af-success-icon {
        font-size: 4rem;
        width: 6rem;
        height: 6rem;
        line-height: 6rem;
    }
    
    .af-success-step h3 {
        font-size: 2.4rem;
    }
    
    .af-success-step p {
        font-size: 1.6rem;
    }
}

/* Print styles */
@media print {
    .af-funnel-container {
        box-shadow: none;
        border: 0.1rem solid #ccc;
    }
    
    .af-btn {
        display: none;
    }
    
    .af-step {
        display: block !important;
        page-break-inside: avoid;
    }
}