/**
 * AUANI Multi-Step Wizard Form Styles
 * Mobile-first step-by-step form navigation
 */

/* Wizard wrapper */
.auani-wizard-wrapper {
    max-width: 100%;
    padding: 16px;
    margin: 0 auto;
    background: transparent !important;
}

/* Progress indicator */
.auani-wizard-progress {
    margin-bottom: 24px;
}

.auani-progress-bar {
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.auani-progress-fill {
    height: 100%;
    background: #4CAF50;
    transition: width 0.3s ease;
    width: 20%; /* Default: step 1 of 5 */
}

.auani-step-counter {
    text-align: center;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Wizard form */
.auani-wizard-form {
    position: relative;
    min-height: 420px;
    background: transparent !important;
}

/* Individual steps */
.auani-wizard-step {
    display: none;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.auani-wizard-step.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.auani-wizard-step.sliding-out-left {
    animation: slideOutLeft 0.3s ease forwards;
}

.auani-wizard-step.sliding-out-right {
    animation: slideOutRight 0.3s ease forwards;
}

.auani-wizard-step.sliding-in-left {
    animation: slideInLeft 0.3s ease forwards;
}

.auani-wizard-step.sliding-in-right {
    animation: slideInRight 0.3s ease forwards;
}

@keyframes slideOutLeft {
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

@keyframes slideOutRight {
    to {
        opacity: 0;
        transform: translateX(20px);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Step title */
.auani-step-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    padding: 0;
}

/* Inputs */
.auani-wizard-wrapper .auani-input {
    width: 100%;
    padding: 14px;
    margin-bottom: 12px;
    border: 2px solid #ddd;
    border-radius: 2px;
    font-size: 16px;
    -webkit-appearance: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.auani-wizard-wrapper .auani-input:focus {
    outline: none;
    border-color: #4CAF50;
}

.auani-wizard-wrapper .auani-input.error {
    border-color: #f44336;
}

/* Small inputs */
.auani-wizard-wrapper .auani-input-sm {
    padding: 12px;
    font-size: 15px;
}

/* Input groups */
.auani-wizard-wrapper .auani-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.auani-wizard-wrapper .auani-input-group .auani-input {
    margin-bottom: 0;
}

/* Field hints */
.auani-field-hint {
    display: block;
    font-size: 13px;
    color: #666;
    margin: -8px 0 12px 4px;
}

/* Address fields */
.auani-wizard-wrapper .auani-address-fields {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #ddd;
    background: none;
}

/* Review section */
.auani-review-section {
    background: #f3fcf0;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid #295136;
}

.auani-price-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 15px;
    color: #295136;
}

.auani-price-total {
    border-top: 2px solid #295136;
    margin-top: 8px;
    padding-top: 12px;
    font-size: 18px;
    color: #295136;
    font-weight: bold;
}

/* Payment section */
.auani-payment-section {
    margin-top: 20px;
}

.auani-payment-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.auani-stripe-card-input {
    padding: 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    margin-bottom: 12px;
}

.auani-card-errors {
    color: #f44336;
    font-size: 13px;
    margin-top: 8px;
}

.auani-payment-note {
    font-size: 13px;
    color: #666;
    background: #e8f5e9;
    padding: 12px;
    border-radius: 6px;
    margin-top: 12px;
}

/* Navigation buttons */
.auani-wizard-navigation {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.auani-wizard-wrapper .auani-btn {
    flex: 1;
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-appearance: none;
}

.auani-btn-back {
    background: #f5f5f5;
    color: #333;
}

.auani-btn-back:hover {
    background: #e0e0e0;
}

.auani-btn-next {
    background: #4CAF50;
    color: white;
}

.auani-btn-next:hover {
    background: #45a049;
}

.auani-btn-next:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.auani-btn-submit {
    background: #9fcc2f;
    color: #f3fcf0;
}

.auani-btn-submit:hover {
    background: #295136;
}

.auani-btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.auani-wizard-wrapper .auani-btn:active:not(:disabled) {
    transform: scale(0.98);
}

/* Loading spinner */
.auani-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Messages */
.auani-form-messages {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
}

.auani-form-messages.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.auani-form-messages.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Desktop optimizations */
@media (min-width: 768px) {
    .auani-wizard-wrapper {
        max-width: 540px;
        padding: 32px;
    }
    
    .auani-wizard-form {
        min-height: 450px;
    }
    
    .auani-step-title {
        font-size: 24px;
        margin-bottom: 24px;
    }
    
    .auani-wizard-wrapper .auani-input {
        padding: 16px;
        margin-bottom: 16px;
    }
}

/* Autocomplete dropdown */
.pac-container {
    font-family: inherit;
    border-radius: 8px;
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
}

.pac-item {
    padding: 12px;
    cursor: pointer;
    font-size: 15px;
    border-top: 1px solid #e0e0e0;
}

.pac-item:first-child {
    border-top: none;
}

.pac-item:hover {
    background: #f5f5f5;
}

.pac-item-query {
    font-weight: 600;
    color: #333;
}
