/**
 * Custom Authorize.Net eCheck Payment Form Styles
 * All classes are prefixed with "wb-echeck-" to prevent conflicts
 */

/* Main Wrapper - Scoped to prevent conflicts */
.wb-authnet-echeck-wrapper {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.wb-authnet-echeck-wrapper * {
    box-sizing: border-box;
}

.wb-authnet-echeck-form {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 40px;
    position: relative;
}

/* Step Management */
.wb-authnet-echeck-form .wb-echeck-step {
    display: none;
}

.wb-authnet-echeck-form .wb-echeck-step.wb-echeck-step-active {
    display: block;
    animation: wbEcheckFadeIn 0.3s ease-in;
}

@keyframes wbEcheckFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Step Header */
.wb-authnet-echeck-form .wb-echeck-step-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.wb-authnet-echeck-form .wb-echeck-step-title {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
}

.wb-authnet-echeck-form .wb-echeck-step-description {
    margin: 0;
    color: #7f8c8d;
    font-size: 16px;
    line-height: 1.5;
}

/* Amount Selection */
.wb-authnet-echeck-form .wb-echeck-amount-selection {
    margin-bottom: 30px;
}

.wb-authnet-echeck-form .wb-echeck-preset-amounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.wb-authnet-echeck-form .wb-echeck-amount-card {
    display: block;
    cursor: pointer;
    position: relative;
    margin: 0;
}

.wb-authnet-echeck-form .wb-echeck-amount-card .wb-echeck-amount-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wb-authnet-echeck-form .wb-echeck-amount-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 20px;
    border: 3px solid #e0e0e0;
    border-radius: 10px;
    background: #ffffff;
    transition: all 0.3s ease;
    min-height: 100px;
}

.wb-authnet-echeck-form .wb-echeck-amount-card:hover .wb-echeck-amount-card-content {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.wb-authnet-echeck-form .wb-echeck-amount-card .wb-echeck-amount-radio:checked + .wb-echeck-amount-card-content {
    border-color: #3498db;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.wb-authnet-echeck-form .wb-echeck-amount-value {
    font-size: 32px;
    font-weight: 700;
    color: inherit;
    line-height: 1.2;
}

.wb-authnet-echeck-form .wb-echeck-amount-label {
    font-size: 18px;
    font-weight: 600;
    color: inherit;
    line-height: 1.3;
}

/* Custom Amount */
.wb-authnet-echeck-form .wb-echeck-custom-amount-wrapper {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.wb-authnet-echeck-form .wb-echeck-custom-amount-card {
    margin-bottom: 20px;
}

.wb-authnet-echeck-form .wb-echeck-custom-amount-input-group {
    margin-left: 0;
    margin-top: 15px;
}

.wb-authnet-echeck-form .wb-echeck-input-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.wb-authnet-echeck-form .wb-echeck-input-with-symbol {
    position: relative;
    display: flex;
    align-items: center;
}

.wb-authnet-echeck-form .wb-echeck-currency-symbol {
    position: absolute;
    left: 20px;
    font-size: 20px;
    font-weight: 700;
    color: #7f8c8d;
    pointer-events: none;
    z-index: 1;
}

.wb-authnet-echeck-form .wb-echeck-custom-amount-input {
    width: 100%;
    padding: 15px 20px 15px 45px;
    border: 3px solid #e0e0e0;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    background: #ffffff;
}

.wb-authnet-echeck-form .wb-echeck-custom-amount-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
}

.wb-authnet-echeck-form .wb-echeck-custom-amount-input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* Selected Amount Display */
.wb-authnet-echeck-form .wb-echeck-selected-amount-display {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    text-align: center;
}

.wb-authnet-echeck-form .wb-echeck-amount-summary {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.wb-authnet-echeck-form .wb-echeck-summary-label {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.wb-authnet-echeck-form .wb-echeck-summary-amount {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
}

/* Form Grid */
.wb-authnet-echeck-form .wb-echeck-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.wb-authnet-echeck-form .wb-echeck-form-group {
    display: flex;
    flex-direction: column;
}

.wb-authnet-echeck-form .wb-echeck-form-group.wb-echeck-form-group-full {
    grid-column: 1 / -1;
}

.wb-authnet-echeck-form .wb-echeck-form-label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.wb-authnet-echeck-form .wb-echeck-required {
    color: #e74c3c;
}

.wb-authnet-echeck-form .wb-echeck-form-control {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
    font-family: inherit;
}

.wb-authnet-echeck-form .wb-echeck-form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.wb-authnet-echeck-form .wb-echeck-form-control.wb-echeck-error {
    border-color: #e74c3c;
}

.wb-authnet-echeck-form .wb-echeck-form-control.wb-echeck-error:focus {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Payment Method Info */
.wb-authnet-echeck-form .wb-echeck-payment-method-info {
    margin-bottom: 30px;
}

.wb-authnet-echeck-form .wb-echeck-payment-method-badge {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    border-radius: 10px;
    color: #ffffff;
}

.wb-authnet-echeck-form .wb-echeck-payment-icon {
    font-size: 48px;
    line-height: 1;
}

.wb-authnet-echeck-form .wb-echeck-payment-details {
    flex: 1;
}

.wb-authnet-echeck-form .wb-echeck-payment-method-title {
    margin: 0 0 8px 0;
    font-size: 22px;
    color: #ffffff;
    font-weight: 700;
}

.wb-authnet-echeck-form .wb-echeck-payment-method-description {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

/* Order Summary */
.wb-authnet-echeck-form .wb-echeck-order-summary {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.wb-authnet-echeck-form .wb-echeck-order-summary-title {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 700;
}

.wb-authnet-echeck-form .wb-echeck-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.wb-authnet-echeck-form .wb-echeck-summary-row.wb-echeck-summary-row-total {
    border-bottom: none;
    border-top: 2px solid #2c3e50;
    margin-top: 10px;
    padding-top: 15px;
    font-size: 20px;
    font-weight: 700;
}

.wb-authnet-echeck-form .wb-echeck-summary-row-label {
    font-weight: 600;
    color: #2c3e50;
}

.wb-authnet-echeck-form .wb-echeck-summary-row-amount,
.wb-authnet-echeck-form .wb-echeck-summary-row-total-amount {
    font-weight: 700;
    color: #27ae60;
}

/* Customer Info Summary */
.wb-authnet-echeck-form .wb-echeck-customer-info-summary {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.wb-authnet-echeck-form .wb-echeck-customer-info-title {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 700;
}

.wb-authnet-echeck-form .wb-echeck-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.wb-authnet-echeck-form .wb-echeck-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.wb-authnet-echeck-form .wb-echeck-info-item.wb-echeck-info-item-full {
    grid-column: 1 / -1;
}

.wb-authnet-echeck-form .wb-echeck-info-label {
    font-weight: 600;
    color: #7f8c8d;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wb-authnet-echeck-form .wb-echeck-info-value {
    color: #2c3e50;
    font-size: 15px;
    line-height: 1.5;
}

/* Form Actions */
.wb-authnet-echeck-form .wb-echeck-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
}

.wb-authnet-echeck-form .wb-echeck-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: inherit;
}

.wb-authnet-echeck-form .wb-echeck-btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #ffffff;
    flex: 1;
}

.wb-authnet-echeck-form .wb-echeck-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.wb-authnet-echeck-form .wb-echeck-btn-primary:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.6;
}

.wb-authnet-echeck-form .wb-echeck-btn-secondary {
    background: #ecf0f1;
    color: #2c3e50;
}

.wb-authnet-echeck-form .wb-echeck-btn-secondary:hover {
    background: #bdc3c7;
}

.wb-authnet-echeck-form .wb-echeck-btn-submit {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: #ffffff;
}

.wb-authnet-echeck-form .wb-echeck-btn-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3);
}

/* Messages */
.wb-authnet-echeck-form .wb-echeck-form-messages {
    margin: 20px 0;
}

.wb-authnet-echeck-form .wb-echeck-alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 15px;
    line-height: 1.5;
}

.wb-authnet-echeck-form .wb-echeck-alert-error {
    background-color: #fee;
    border: 2px solid #e74c3c;
    color: #c0392b;
}

.wb-authnet-echeck-form .wb-echeck-alert-success {
    background-color: #eafaf1;
    border: 2px solid #27ae60;
    color: #1e8449;
}

/* Loading Overlay */
.wb-authnet-echeck-form .wb-echeck-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    z-index: 1000;
}

.wb-authnet-echeck-form .wb-echeck-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: wbEcheckSpin 1s linear infinite;
}

@keyframes wbEcheckSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.wb-authnet-echeck-form .wb-echeck-loading-text {
    margin-top: 20px;
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
}

/* eCheck Thank You Notice */
.wb-echeck-thankyou-wrapper {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 4px solid #27ae60;
}

.wb-echeck-thankyou-wrapper .wb-echeck-thankyou-title {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 700;
}

.wb-echeck-thankyou-wrapper .wb-echeck-thankyou-method,
.wb-echeck-thankyou-wrapper .wb-echeck-thankyou-amount {
    margin: 10px 0;
    color: #2c3e50;
    font-size: 15px;
    line-height: 1.6;
}

.wb-echeck-thankyou-wrapper .wb-echeck-thankyou-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 12px;
    border-radius: 6px;
    color: #856404;
    margin-top: 15px;
    margin-bottom: 0;
    font-size: 14px;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wb-authnet-echeck-form {
        padding: 25px 20px;
    }
    
    .wb-authnet-echeck-form .wb-echeck-preset-amounts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wb-authnet-echeck-form .wb-echeck-form-grid {
        grid-template-columns: 1fr;
    }
    
    .wb-authnet-echeck-form .wb-echeck-info-grid {
        grid-template-columns: 1fr;
    }
    
    .wb-authnet-echeck-form .wb-echeck-form-actions {
        flex-direction: column-reverse;
    }
    
    .wb-authnet-echeck-form .wb-echeck-btn {
        width: 100%;
    }
    
    .wb-authnet-echeck-form .wb-echeck-amount-summary {
        flex-direction: column;
        gap: 10px;
    }
    
    .wb-authnet-echeck-form .wb-echeck-payment-method-badge {
        flex-direction: column;
        text-align: center;
    }
    
    .wb-authnet-echeck-form .wb-echeck-step-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .wb-authnet-echeck-form .wb-echeck-preset-amounts-grid {
        grid-template-columns: 1fr;
    }
    
    .wb-authnet-echeck-form .wb-echeck-step-title {
        font-size: 22px;
    }
    
    .wb-authnet-echeck-form .wb-echeck-amount-value {
        font-size: 28px;
    }
    
    .wb-authnet-echeck-form .wb-echeck-summary-amount {
        font-size: 28px;
    }
}