/* Base Styles */
.checkout {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background-color: #f8f9fa;
    padding: 20px 0;
}

.title-thead {
    text-align: center;
    vertical-align: middle;
    font-weight: 600;
    background: #333;
    color: #fff;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Form Styles */
.checkout-inner {
    background: #fff;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    padding: 10px;
}

.billing-address,
.shipping-address {
    padding: -5px !important;
}

/* h1, h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 600;
}

h2 {
    font-size: 22px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
} */

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* .custom-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' 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: right 10px center;
    background-size: 1em;
} */

/* ===== Coupon Box ===== */
.coupon {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 15px 0;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* حقل الإدخال */
.coupon input[type="text"] {
    flex: 1;
    min-width: 180px;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: 0.2s;
}

.coupon input[type="text"]:focus {
    border-color: var(--primary-color, #007bff);
    outline: none;
    box-shadow: 0 0 4px rgba(0, 123, 255, 0.3);
}

/* زر تطبيق الكود */
.coupon button {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    /* background: var(--primary-color, #007bff); */
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.2s;
}

/* .coupon button:hover {
  background: var(--primary-dark, #0056b3);
} */

/* زر إزالة الكوبون */
#remove-coupon-wrapper {
    margin-top: 10px;
    text-align: center;
}

#remove-coupon {
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 576px) {
    .coupon {
        flex-direction: column;
        align-items: stretch;
    }

    .coupon input[type="text"],
    .coupon button {
        width: 100%;
    }
}

/* ===== Applied Discounts ===== */
.applied-discounts {
    margin-top: 10px;
    padding: 8px 10px;
    border-top: 1px dashed #ddd;
}

.applied-discounts .discount-item {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 400;
    color: #444;
    margin: 6px 0;
}

.discount-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary-color, #007bff);
    flex-shrink: 0;
    margin-inline-end: 8px;
    /* RTL/LTR auto */
}

.discount-tag {
    display: inline-block;
    color: var(--danger-color);
}

/* Checkbox Styles */
.custom-control {
    position: relative;
    display: block;
    min-height: 1.5rem;
    padding-left: 1.5rem;
    margin-bottom: 15px;
}

.custom-control-input {
    position: absolute;
    left: 0;
    z-index: -1;
    width: 1rem;
    height: 1.25rem;
    opacity: 0;
}

.clamp-textarea {
    height: auto;
    max-height: calc(1.2em * 6);
    /* تقريبًا 5 سطور */
    line-height: 1.2em;
    /* overflow: hidden;
  resize: none;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  white-space: normal;
  text-overflow: ellipsis; */
}

.custom-control-label {
    position: relative;
    margin-bottom: 0;
    vertical-align: top;
    cursor: pointer;
}

.custom-control-label::before {
    position: absolute;
    top: 0.25rem;
    left: -1.5rem;
    display: block;
    width: 1rem;
    height: 1rem;
    pointer-events: none;
    content: "";
    background-color: #fff;
    border: 1px solid #adb5bd;
    border-radius: 0.25rem;
}

.custom-control-input:checked~.custom-control-label::before {
    color: #fff;
    border-color: #3498db;
    background-color: #3498db;
}

.custom-control-input:focus~.custom-control-label::before {
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.custom-checkbox .custom-control-label::before {
    border-radius: 0.25rem;
}

.custom-checkbox .custom-control-input:checked~.custom-control-label::after {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E");
}

/* Payment Methods */
.payment-methods {
    /* margin: 25px 0; */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.payment-method {
    /* margin-bottom: 15px;
    padding: 15px; */
    border: 1px solid #eee;
    border-radius: 5px;
    transition: all 0.3s;
}

.payment-method:hover {
    border-color: #3498db;
}

.payment-content {
    padding: 10px 0 0 20px;
    font-size: 14px;
    color: #6c757d;
    display: none;
}

.custom-radio .custom-control-label::before {
    border-radius: 50%;
}

.custom-radio .custom-control-input:checked~.custom-control-label::after {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23fff'/%3E%3C/svg%3E");
}

.custom-radio .custom-control-input:checked~.custom-control-label::before {
    background-color: #3498db;
    border-color: #3498db;
}

/* Show payment content when radio is checked */
.custom-control-input:checked~.payment-content {
    display: block;
}

/* Order Summary */
.checkout-summary {
    margin-bottom: 30px;
}

/* .checkout-summary h1 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #343a40;
    font-weight: 600;
} */

.checkout-summary p {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #6c757d;
}

/* .checkout-summary h2 {
   font-size: 1.3rem;
    margin-top: 15px;
    color: #343a40;
    font-weight: 600;
} */

.sub-total,
.ship-cost,
.discount {
    font-weight: 600;
}

.discount {
    color: var(--danger-color);
}

.grand-total {
    color: var(--primary-color);
    font-weight: bold;
}

.checkout-btn {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 25px;
}

/* Button Styles */
.checkout-btn button {
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.checkout-btn button:hover {
    background-color: #2980b9;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .checkout {
        padding: 20px 0;
    }

    .checkout-inner {
        padding: 20px;
    }
}

/* Shipping Address - Initially Hidden */
.shipping-address {
    display: none;
}

/* Show shipping address when checkbox is checked */
#shipto:checked~.checkout-inner .shipping-address {
    display: block;
}