/* one-page-checkout.css */

/* Define local Cairo font for Arabic text */
@font-face {
  font-family: 'Cairo';
  src: url('./Cairo/static/Cairo-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Cairo';
  src: url('./Cairo/static/Cairo-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}


/* General Styles */
.ast-woocommerce-container .product .product_meta,
.ast-woocommerce-container .product .cart,
.woocommerce-billing-fields h3,
#order_review,
#order_review_heading,
#customer_details .woocommerce-additional-fields,
#ast-site-header-cart,
#main .woocommerce-products-header {
    display: none !important;
}

/* One Page Checkout Wrapper - Beautiful Modern Design */
.one-page-checkout-wrapper {
    margin: 20px 0;
    padding: 25px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 
        0 10px 25px rgba(0,0,0,0.05),
        0 0 0 1px rgba(0,0,0,0.03),
        inset 0 2px 0 rgba(255,255,255,0.4);
    max-width: 450px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.one-page-checkout-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4CAF50, #8BC34A, #FFC107, #FF9800, #FF5722);
    border-radius: 16px 16px 0 0;
}

.one-page-checkout-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.1),
        0 0 0 1px rgba(0,0,0,0.05),
        inset 0 2px 0 rgba(255,255,255,0.4);
}

/* Make form beautiful on desktop */
@media (min-width: 992px) {
    .one-page-checkout-wrapper {
        width: 100%;
        max-width: 480px;
        margin: 25px auto;
        display: block;
    }
}

/* Beautiful Form Styles - Uiverse.io Design */
.input-group {
  display: flex;
  flex-direction: column;
  width: 100%;
  position: relative;
  margin-bottom: 25px;
}

.user-label {
  font-size: 1rem;
  color: #818CF8;
  font-weight: 700;
  position: absolute;
  top: 0.01rem; /* Position label in the middle of the top border */
  left: 12px;
  margin: 0;
  padding: 0 6px;
  background: #ffffff;
  z-index: 1;
  pointer-events: none;
  transition: all 0.2s ease;
  transform: translateY(-50%);
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  direction: rtl;
}

.input {
  width: 100%;
  border: 2px solid #818CF8;
  border-radius: 8px !important;
  background: #ffffff;
  padding: 18px 16px 12px 16px; /* Adjusted padding to accommodate label */
  font-size: 1rem;
  color: #212121;
  transition: border 150ms cubic-bezier(0.4,0,0.2,1);
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  box-sizing: border-box;
  direction: rtl;
}

.input.has-value ~ .user-label,
.input:focus ~ .user-label {
  top: -0.9rem; /* Position label more at the top when focused/has value */
  left: 12px;
  font-size: 0.75rem;
  transform: translateY(-50%);
  background-color: #ffffff;
  padding: 0 0.2em;
  color: #4F46E5;
}

.input:focus {
  outline: none;
  border: 2px solid #4F46E5;
}

/* Hover effects */
.input:hover {
  border-color: #4F46E5;
  box-shadow: 
      inset 0 2px 8px rgba(0,0,0,0.05),
      0 0 0 4px rgba(79, 70, 229, 0.15);
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

/* Adjust the form to use the new input style */
.wooecom_instant_order_form {
    display: flex;
    flex-direction: column;
    margin-top: 3%;
}

/* Beautiful Checkout Button */
.wooecom_checkout {
    width: 100%;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 16px 25px;
    font-size: 17px;
    font-weight: 600;
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s ease;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    position: relative;
    box-shadow: 
        0 6px 12px rgba(76, 175, 80, 0.3),
        0 4px 6px rgba(76, 175, 80, 0.2);
    margin-top: 15px;
    overflow: hidden;
}

.wooecom_checkout::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.3),
        transparent
    );
    transition: 0.6s;
}

.wooecom_checkout:hover::before {
    left: 100%;
}

.wooecom_checkout:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    box-shadow: 
        0 10px 20px rgba(76, 175, 80, 0.4),
        0 6px 8px rgba(76, 175, 80, 0.3);
    transform: translateY(-3px);
}

.wooecom_checkout:active {
    transform: translateY(-1px);
    box-shadow: 
        0 5px 10px rgba(76, 175, 80, 0.3),
        0 3px 5px rgba(76, 175, 80, 0.2);
}

.wooecom_checkout:disabled {
    background: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Beautiful Quantity Selector */
.wooecom_quantity {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 18px;
    max-width: 140px;
    border-radius: 50px;
    border: 2px solid #e9ecef;
    padding: 5px;
    box-shadow: 
        inset 0 2px 4px rgba(0,0,0,0.03),
        0 1px 3px rgba(0,0,0,0.05);
    background: #ffffff;
    transition: all 0.3s ease;
    overflow: hidden;
}

.wooecom_quantity:hover {
    border-color: #4CAF50;
    box-shadow: 
        inset 0 2px 6px rgba(0,0,0,0.05),
        0 4px 8px rgba(76, 175, 80, 0.1);
}

.wooecom_minus, .wooecom_plus {
    background: transparent;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    font-size: 18px;
    font-weight: bold;
    color: #495057;
    transition: all 0.2s ease;
    border-radius: 40px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.wooecom_minus::after, .wooecom_plus::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.4s ease;
}

.wooecom_minus:hover, .wooecom_plus:hover {
    color: #212529;
    background: #f8f9fa;
}

.wooecom_minus:hover::after, .wooecom_plus:hover::after {
    transform: scale(1);
}

.wooecom_minus:active, .wooecom_plus:active {
    transform: scale(0.95);
}

#wooecom_qty {
    width: 50px;
    text-align: center;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    background: transparent;
    border: none;
    box-shadow: none;
    margin: 0 4px;
    flex: 1;
    min-width: 0;
    text-shadow: 0 1px 1px rgba(255,255,255,0.5);
}

/* Beautiful Variations Container - Fixed padding issue */
.wooecom_variations {
    list-style: none;
    padding: 0 !important; /* Fix for browser default padding */
    margin: 0;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 14px;
    padding: 18px !important;
    border: 2px solid #e9ecef;
    box-shadow: 
        inset 0 2px 4px rgba(0,0,0,0.02),
        0 4px 8px rgba(0,0,0,0.03);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.wooecom_variations::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.3), transparent);
}

.wooecom_variations:hover {
    border-color: #4CAF50;
    box-shadow: 
        inset 0 2px 6px rgba(0,0,0,0.03),
        0 8px 16px rgba(76, 175, 80, 0.1);
    transform: translateY(-2px);
}

.attribute_modern_ui {
    margin-bottom: 16px;
}

.attribute_modern_ui:last-child {
    margin-bottom: 0;
}

.attribute_modern_ui h4 {
    margin-bottom: 12px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 15px;
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 25px;
}

.attribute_modern_ui h4::before {
    content: '✦';
    color: #4CAF50;
    margin-right: 8px;
    font-size: 16px;
    position: absolute;
    left: 0;
}

.attribute_inner {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.attribute_inner label {
    display: inline-block;
    padding: 10px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 25px; /* Beautiful rounded pill */
    cursor: pointer;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    transition: all 0.3s ease;
    background: #ffffff;
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.05),
        inset 0 1px 0 rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
    text-align: center;
    min-width: 50px;
}

.attribute_inner label::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.6s ease;
}

.attribute_inner label:hover {
    border-color: #4CAF50;
    background: #f8fff8;
    transform: translateY(-3px);
    box-shadow: 
        0 6px 12px rgba(76, 175, 80, 0.15),
        inset 0 1px 0 rgba(255,255,255,0.5);
}

.attribute_inner label:hover::before {
    transform: scale(1);
}

.attribute_inner input[type="radio"]:checked + label {
    border-color: #4CAF50;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    box-shadow: 
        0 8px 16px rgba(76, 175, 80, 0.2),
        inset 0 1px 0 rgba(255,255,255,0.5);
    color: #2E7D32;
    font-weight: 600;
    transform: translateY(-3px);
    position: relative;
}

.attribute_inner input[type="radio"]:checked + label::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.attribute_inner input[type="radio"] {
    display: none;
}

/* Beautiful Order Summary */
.wooecom_order_summary {
    margin-top: 20px;
    border: 2px solid #e9ecef;
    border-radius: 14px;
    padding: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 
        inset 0 2px 4px rgba(0,0,0,0.02),
        0 6px 12px rgba(0,0,0,0.04);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.wooecom_order_summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
}

.wooecom_order_summary:hover {
    border-color: #4CAF50;
    box-shadow: 
        inset 0 2px 6px rgba(0,0,0,0.03),
        0 10px 20px rgba(76, 175, 80, 0.1);
    transform: translateY(-2px);
}

.wooecom_order_summary_head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eee;
    position: relative;
}

.wooecom_order_summary_head::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.wooecom_order_summary_head:hover::after {
    transform: scaleX(1);
}

.wooecom_order_summary_title {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.wooecom_order_summary_title i {
    margin-right: 10px;
    color: #4CAF50;
    font-size: 18px;
    background: rgba(76, 175, 80, 0.1);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wooecom_price_table table {
    width: 100%;
    border-collapse: collapse;
}

.wooecom_price_table td {
    padding: 10px 8px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    transition: all 0.3s ease;
}

.wooecom_price_table td:hover {
    background-color: rgba(76, 175, 80, 0.03);
}

.wooecom_price_table .product_name {
    font-weight: 600;
    color: #34495e;
}

.wooecom_price {
    font-weight: 700;
    color: #4CAF50;
    font-size: 15px;
    text-shadow: 0 1px 1px rgba(255,255,255,0.5);
}

.shipping_price .wooecom_shipping_cost {
    color: #666;
    font-weight: 500;
}

.total_price .wooecom_price {
    font-size: 18px;
    color: #2E7D32;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(46, 125, 50, 0.1);
}

.hidden {
    display: none;
}

.wooecom_notice {
    color: #c62828;
    text-align: center;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 500;
    padding: 12px;
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-radius: 10px;
    border-left: 4px solid #c62828;
    box-shadow: 0 2px 8px rgba(198, 40, 40, 0.1);
}

/* Loader */
.order_loader_container {
    display: none;
    text-align: center;
    padding: 20px;
}

.wooecom_order_loader {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Button Loader */
.wooecom_btn_loader {
    display: none;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.wooecom_btn_loader:before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 991px) {
    .one-page-checkout-wrapper {
        max-width: 100%;
        margin: 20px auto;
    }
    
    .input-group {
        margin-bottom: 22px;
    }
    
    .input {
        padding: 16px 14px 10px 14px;
        font-size: 0.9rem;
    }
    
    .user-label {
        font-size: 1rem;
        top: 0.01rem;
        left: 10px;
        padding: 0 5px;
    }
    
    .input.has-value ~ .user-label,
    .input:focus ~ .user-label {
        top: -0.85rem;
        left: 10px;
        font-size: 0.7rem;
    }
}

@media (max-width: 768px) {
    .one-page-checkout-wrapper {
        padding: 20px;
        margin: 15px auto;
    }
    
    .input-group {
        margin-bottom: 20px;
    }
    
    .input {
        padding: 15px 12px 9px 12px;
        font-size: 0.85rem;
    }
    
    .user-label {
        font-size: 0.75rem;
        top: -0.6rem;
        left: 9px;
        padding: 0 4px;
    }
    
    .input.has-value ~ .user-label,
    .input:focus ~ .user-label {
        top: -0.8rem;
        left: 9px;
        font-size: 0.65rem;
    }
    
    .wooecom_checkout {
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .wooecom_quantity {
        max-width: 130px;
    }
    
    .wooecom_minus, .wooecom_plus {
        padding: 10px 14px;
        font-size: 16px;
        width: 40px;
        height: 40px;
    }
    
    #wooecom_qty {
        padding: 10px;
        font-size: 15px;
    }
    
    .wooecom_variations {
        padding: 15px !important;
        margin-bottom: 18px;
    }
    
    .attribute_modern_ui h4 {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .attribute_inner label {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .wooecom_order_summary {
        padding: 16px;
        margin-top: 18px;
    }
    
    .wooecom_order_summary_title {
        font-size: 15px;
    }
    
    .wooecom_price_table td {
        padding: 8px 6px;
        font-size: 13px;
    }
    
    .wooecom_price {
        font-size: 14px;
    }
    
    .total_price .wooecom_price {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .one-page-checkout-wrapper {
        padding: 16px;
        margin: 12px auto;
    }
    
    .input-group {
        margin-bottom: 18px;
    }
    
    .input {
        padding: 14px 11px 8px 11px;
        font-size: 0.8rem;
    }
    
    .user-label {
        font-size: 0.9rem;
        top: 0.01rem;
        left: 8px;
        padding: 0 3px;
    }
    
    .input.has-value ~ .user-label,
    .input:focus ~ .user-label {
        top: -0.75rem;
        left: 8px;
        font-size: 0.6rem;
    }
    
    .wooecom_checkout {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    .attribute_inner label {
        padding: 7px 12px;
        font-size: 12px;
    }
    
    .wooecom_order_summary_title {
        font-size: 14px;
    }
    
    .wooecom_order_summary_title i {
        font-size: 16px;
        width: 28px;
        height: 28px;
    }
    
    .wooecom_price_table td {
        padding: 6px 5px;
        font-size: 12px;
    }
    
    .wooecom_order_summary {
        padding: 14px;
    }
}