/**
 * ResellerHero UX Flows Styles
 * 
 * Styles for advanced UX flows including wizards, bundle builder,
 * and multi-step forms.
 *
 * @package ResellerHero
 * @since 2.0.0
 */

/* Wizard Base Styles */
.rh-wizard {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.rh-wizard-header {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.rh-wizard-title {
    font-size: 1.8em;
    font-weight: 700;
    margin: 0;
}

.rh-wizard-subtitle {
    margin: 5px 0 0 0;
    opacity: 0.9;
    font-size: 1.1em;
}

/* Wizard Steps */
.rh-wizard-steps {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e1e1;
    padding: 0;
    margin: 0;
    list-style: none;
}

.rh-wizard-step {
    flex: 1;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    border-right: 1px solid #e1e1e1;
}

.rh-wizard-step:last-child {
    border-right: none;
}

.rh-wizard-step:hover {
    background: #e9ecef;
}

.rh-wizard-step.active {
    background: #0073aa;
    color: white;
}

.rh-wizard-step.completed {
    background: #46b450;
    color: white;
}

.rh-wizard-step.completed:before {
    content: "✓";
    position: absolute;
    top: 5px;
    right: 5px;
    font-weight: bold;
    font-size: 0.9em;
}

.rh-step-number {
    display: block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ddd;
    color: #666;
    line-height: 30px;
    margin: 0 auto 8px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.rh-wizard-step.active .rh-step-number,
.rh-wizard-step.completed .rh-step-number {
    background: rgba(255,255,255,0.2);
    color: white;
}

.rh-step-title {
    font-weight: 600;
    font-size: 0.9em;
    margin: 0;
}

/* Wizard Content */
.rh-wizard-body {
    padding: 30px;
    min-height: 400px;
}

.rh-wizard-content {
    display: none;
}

.rh-wizard-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

.rh-wizard-error {
    background: #fdf0f0;
    border: 1px solid #dc3232;
    color: #dc3232;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: none;
}

/* Form Elements */
.rh-form-group {
    margin-bottom: 20px;
}

.rh-form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.rh-form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.rh-form-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}

.rh-form-input.error {
    border-color: #dc3232;
    box-shadow: 0 0 0 3px rgba(220,50,50,0.1);
}

.rh-form-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 16px;
}

/* Radio and Checkbox Groups */
.rh-radio-group,
.rh-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.rh-radio-option,
.rh-checkbox-option {
    position: relative;
}

.rh-radio-option input,
.rh-checkbox-option input {
    position: absolute;
    opacity: 0;
}

.rh-radio-option label,
.rh-checkbox-option label {
    display: block;
    padding: 15px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.rh-radio-option input:checked + label,
.rh-checkbox-option input:checked + label {
    border-color: #0073aa;
    background: #f0f8ff;
    color: #0073aa;
}

.rh-radio-option label:hover,
.rh-checkbox-option label:hover {
    border-color: #0073aa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Domain Options */
.rh-domain-options {
    margin-top: 20px;
}

.rh-domain-options h4 {
    color: #333;
    margin: 25px 0 15px 0;
    font-size: 1.2em;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 8px;
}

.rh-domain-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    margin-bottom: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.rh-domain-option:hover {
    border-color: #0073aa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.rh-domain-option input:checked + .rh-domain-option,
.rh-domain-option:has(input:checked) {
    border-color: #0073aa;
    background: #f0f8ff;
}

.rh-domain-option.suggestion {
    border-left: 4px solid #ffb900;
}

.domain-name {
    font-weight: 600;
    font-size: 1.1em;
    color: #333;
}

.domain-price {
    color: #0073aa;
    font-weight: 600;
    font-size: 1.1em;
}

/* Bundle Builder */
.rh-bundle-builder {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    padding: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.rh-bundle-title {
    font-size: 2em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.rh-bundle-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.rh-service-card {
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
}

.rh-service-card:hover {
    border-color: #0073aa;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.rh-service-name {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.rh-service-description {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.rh-service-price {
    font-size: 1.5em;
    font-weight: 700;
    color: #0073aa;
    margin-bottom: 20px;
}

.rh-bundle-add {
    padding: 12px 24px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rh-bundle-add:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.rh-bundle-add:disabled {
    background: #46b450;
    cursor: not-allowed;
    transform: none;
}

/* Bundle Summary */
.rh-bundle-summary {
    background: #f8f9fa;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    padding: 25px;
    margin-top: 30px;
}

.rh-bundle-summary h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.4em;
}

.rh-bundle-items {
    margin-bottom: 20px;
}

.rh-bundle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e1e1e1;
}

.rh-bundle-item:last-child {
    border-bottom: none;
}

.service-name {
    font-weight: 600;
    color: #333;
}

.service-price {
    color: #0073aa;
    font-weight: 600;
}

.rh-bundle-remove {
    padding: 6px 12px;
    background: #dc3232;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.rh-bundle-remove:hover {
    background: #a02622;
}

.rh-bundle-total {
    border-top: 2px solid #0073aa;
    padding-top: 15px;
    margin-top: 15px;
}

.rh-bundle-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.rh-bundle-total-row.final {
    font-size: 1.2em;
    font-weight: 700;
    color: #0073aa;
    border-top: 1px solid #ddd;
    padding-top: 8px;
    margin-top: 8px;
}

.discount {
    color: #46b450;
}

/* Wizard Navigation */
.rh-wizard-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: #f8f9fa;
    border-top: 1px solid #e1e1e1;
}

.rh-wizard-prev,
.rh-wizard-next {
    padding: 12px 24px;
    border: 2px solid #0073aa;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.rh-wizard-prev {
    background: white;
    color: #0073aa;
}

.rh-wizard-prev:hover {
    background: #0073aa;
    color: white;
}

.rh-wizard-next {
    background: #0073aa;
    color: white;
}

.rh-wizard-next:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.rh-wizard-prev:disabled,
.rh-wizard-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.rh-wizard-complete {
    background: #46b450;
}

.rh-wizard-complete:hover {
    background: #3e9b47;
}

/* Progress Indicator */
.rh-progress-bar {
    height: 4px;
    background: #e1e1e1;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 20px;
}

.rh-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0073aa 0%, #46b450 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rh-wizard-steps {
        flex-direction: column;
    }
    
    .rh-wizard-step {
        border-right: none;
        border-bottom: 1px solid #e1e1e1;
    }
    
    .rh-wizard-step:last-child {
        border-bottom: none;
    }
    
    .rh-wizard-body {
        padding: 20px;
    }
    
    .rh-radio-group,
    .rh-checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .rh-bundle-services {
        grid-template-columns: 1fr;
    }
    
    .rh-wizard-navigation {
        padding: 15px 20px;
    }
    
    .rh-domain-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .rh-wizard-title {
        font-size: 1.4em;
    }
    
    .rh-wizard-subtitle {
        font-size: 1em;
    }
    
    .rh-step-title {
        font-size: 0.8em;
    }
    
    .rh-bundle-builder {
        padding: 20px;
    }
    
    .rh-bundle-title {
        font-size: 1.6em;
    }
}
