/**
 * WooCommerce Checkout Widget Styles
 * Persian/Farsi RTL layout for checkout and payment
 */

.hep-woocommerce-checkout {
    direction: rtl;
    text-align: right;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Progress Steps */
.hep-progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 20px 0;
    position: relative;
}

.hep-progress-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #e9ecef;
    z-index: 1;
}

.hep-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    background: #ffffff;
    padding: 0 20px;
    transition: all 0.3s ease;
}

.hep-progress-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #6c757d;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.hep-progress-step.active .hep-progress-circle {
    background: #007bff;
    transform: scale(1.1);
}

.hep-progress-content h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.hep-progress-content p {
    margin: 0;
    font-size: 12px;
    color: #6c757d;
    text-align: center;
    line-height: 1.4;
}

.hep-progress-step.active .hep-progress-content h4 {
    color: #007bff;
}

/* Checkout Container */
.hep-checkout-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    align-items: start;
}

.hep-checkout-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hep-checkout-sidebar {
    position: sticky;
    top: 20px;
}

/* Checkout Cards */
.hep-checkout-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 25px;
    border: 1px solid #f8f9fa;
}

.hep-card-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

/* Form Grid */
.hep-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.hep-form-field.hep-full-width {
    grid-column: 1 / -1;
}

.hep-form-field {
    display: flex;
    flex-direction: column;
}

.hep-form-field label {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
}

.hep-form-field input,
.hep-form-field select,
.hep-form-field textarea {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    background: #ffffff;
    transition: all 0.3s ease;
    font-family: inherit;
}

.hep-form-field input:focus,
.hep-form-field select:focus,
.hep-form-field textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.hep-form-field input.error,
.hep-form-field select.error,
.hep-form-field textarea.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Payment Methods */
.hep-payment-methods {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hep-payment-method {
    position: relative;
}

.hep-payment-method input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.hep-payment-label {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
}

.hep-payment-method input[type="radio"]:checked + .hep-payment-label,
.hep-payment-label.selected {
    border-color: #007bff;
    background: #f8f9ff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.1);
}

.hep-payment-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
}

.hep-payment-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hep-payment-text strong {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.hep-payment-text small {
    font-size: 12px;
    color: #6c757d;
}

/* Order Items */
.hep-order-items {
    margin-bottom: 20px;
}

.hep-order-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f8f9fa;
}

.hep-order-item:last-child {
    border-bottom: none;
}

.hep-item-image img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

.hep-item-details h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
}

.hep-item-quantity {
    margin: 0 0 5px 0;
    font-size: 12px;
    color: #6c757d;
}

.hep-item-price {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #28a745;
}

/* Order Summary */
.hep-order-summary {
    margin-bottom: 20px;
}

.hep-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f8f9fa;
}

.hep-summary-row:last-child {
    border-bottom: none;
}

.hep-summary-row.hep-total {
    font-size: 16px;
    font-weight: 600;
    color: #28a745;
    border-top: 2px solid #e9ecef;
    margin-top: 10px;
    padding-top: 15px;
}

/* Buttons */
.hep-btn {
    display: inline-block;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    width: 100%;
}

.hep-btn-primary {
    background: #28a745;
    color: #ffffff;
}

.hep-btn-primary:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
    color: #ffffff;
}

.hep-btn-primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Checkout Actions */
.hep-checkout-actions {
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hep-checkout-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .hep-checkout-sidebar {
        position: static;
        order: -1;
    }
}

@media (max-width: 768px) {
    .hep-woocommerce-checkout {
        padding: 15px;
    }

    .hep-progress-steps {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 30px;
    }

    .hep-progress-steps::before {
        display: none;
    }

    .hep-progress-step {
        padding: 0;
    }

    .hep-form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .hep-checkout-card {
        padding: 20px;
    }

    .hep-payment-label {
        padding: 12px;
    }

    .hep-payment-icon {
        font-size: 20px;
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 576px) {
    .hep-progress-circle {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .hep-progress-content h4 {
        font-size: 14px;
    }

    .hep-progress-content p {
        font-size: 11px;
    }

    .hep-checkout-card {
        padding: 15px;
    }

    .hep-card-title {
        font-size: 16px;
    }

    .hep-form-field input,
    .hep-form-field select,
    .hep-form-field textarea {
        padding: 10px 12px;
        font-size: 13px;
    }

    .hep-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Animation for progress steps */
@keyframes progressPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.hep-progress-step.active .hep-progress-circle {
    animation: progressPulse 2s infinite;
}

/* Focus styles for accessibility */
.hep-form-field input:focus,
.hep-form-field select:focus,
.hep-form-field textarea:focus,
.hep-payment-label:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Error message styles */
.hep-error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.hep-form-field input.error + .hep-error-message,
.hep-form-field select.error + .hep-error-message,
.hep-form-field textarea.error + .hep-error-message {
    display: block;
} 