/**
 * WooCommerce Landing Checkout Frontend Styles
 */

/* Container */
.wlc-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-sizing: border-box;
    direction: rtl;
}

/* Product Info */
.wlc-product-info {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 30px;
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.wlc-product-image {
    flex: 0 0 40%;
    max-width: 40%;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wlc-product-image img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.wlc-product-details {
    flex: 0 0 60%;
    max-width: 60%;
    padding: 20px;
}

.wlc-product-title {
    margin: 0 0 15px;
    font-size: 22px;
    color: #333;
}

.wlc-product-description {
    margin-bottom: 15px;
    color: #555;
    line-height: 1.6;
}

.wlc-product-price {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-top: 15px;
}

.wlc-price-label {
    margin-left: 5px;
}

.wlc-price-value {
    color: var(--primary-color, #3498db);
}

/* Form Wrapper */
.wlc-form-wrapper {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.wlc-form-header {
    background-color: var(--primary-color, #3498db);
    color: #fff;
    padding: 15px 20px;
    text-align: center;
    border-bottom: 3px solid var(--primary-dark, #2980b9);
}

.wlc-form-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

/* Form */
.wlc-form {
    padding: 20px;
}

.wlc-form-row {
    margin-bottom: 15px;
}

.wlc-form-group {
    position: relative;
}

.wlc-form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

.wlc-required {
    color: #e74c3c;
    margin-right: 3px;
}

.wlc-optional {
    color: #7f8c8d;
    font-size: 14px;
    font-weight: normal;
}

.wlc-form-control {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 16px;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 5px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.wlc-form-control:focus {
    border-color: var(--primary-color, #3498db);
    outline: 0;
    box-shadow: 0 0 0 0.1rem rgba(52, 152, 219, 0.25);
}

.wlc-form-select {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 16px;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 5px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 10px center;
    padding-left: 35px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.wlc-form-select:focus {
    border-color: var(--primary-color, #3498db);
    outline: 0;
    box-shadow: 0 0 0 0.1rem rgba(52, 152, 219, 0.25);
}

/* Quantity Input */
.wlc-quantity-wrapper {
    display: flex;
    align-items: center;
    max-width: 200px;
}

.wlc-quantity-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background-color: #6c5ce7;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.wlc-quantity-btn:hover {
    background-color: #5541d8;
}

.wlc-quantity-input {
    flex: 1;
    text-align: center;
    margin: 0 8px;
    padding: 5px;
    width: 100%;
}

.wide-quantity {
    width: 100%;
    font-size: 16px;
}

/* Reduced margin for form elements */
.wlc-reduced-margin {
    margin-bottom: 5px !important;
}

/* Submit Button */
.wlc-form-submit {
    display: block;
    width: 100%;
    padding: 12px 15px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: #fff;
    background-color: var(--button-color, #2ecc71);
    border: none;
    border-bottom: 3px solid var(--button-dark, #27ae60);
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.wlc-form-submit:hover {
    background-color: var(--button-dark, #27ae60);
}

.wlc-form-submit:focus {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(46, 204, 113, 0.25);
}

/* Form messages */
.wlc-form-messages {
    padding: 10px 0;
}

.wlc-alert {
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid transparent;
    border-radius: 5px;
}

.wlc-alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.wlc-alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.wlc-alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.wlc-alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.wlc-invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 5px;
    font-size: 14px;
    color: #e74c3c;
}

.wlc-form-control.is-invalid,
.wlc-form-select.is-invalid {
    border-color: #e74c3c;
}

.wlc-form-control.is-invalid + .wlc-invalid-feedback,
.wlc-form-select.is-invalid + .wlc-invalid-feedback {
    display: block;
}

/* Spinner */
.wlc-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: wlc-spin 1s ease-in-out infinite;
}

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

/* Responsive */
@media (max-width: 767px) {
    .wlc-product-image,
    .wlc-product-details {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .wlc-product-image {
        padding-bottom: 0;
    }
    
    .wlc-form {
        padding: 15px;
    }
    
    .wlc-form-row {
        margin-bottom: 10px;
    }
    
    .wlc-form-label {
        margin-bottom: 5px;
    }
    
    .wlc-form-control {
        padding: 8px 12px;
    }
}
