/* Custom Checkout Styles for WeddingBells */

.checkout-page-container {
    background-color: #fff;
    padding-top: 4rem;
    padding-bottom: 6rem;
}

.checkout-page-container .summary-card {
    background: #f9f9f9;
    border: 1px dashed #d7d7d7;
    border-radius: 0;
    box-shadow: none;
    padding: 3rem !important;
}

.checkout-page-container .summary-title {
    font-family: var(--wb-font-family, 'Poppins', sans-serif);
    font-weight: 500;
    font-size: 2rem;
    color: #333;
    text-align: left !important;
    border-bottom: 1px solid #ebebeb;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

/* Info Messages & Toggles */
.woocommerce-info {
    border-top-color: var(--wb-primary, #c96);
    background-color: #f7f7f7;
    padding: 1.5rem 2rem;
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 2rem;
    position: relative;
    border-top: 3px solid var(--wb-primary, #c96);
}

.woocommerce-info a {
    color: var(--wb-primary, #c96);
    font-weight: 600;
}

.woocommerce-form-login,
.woocommerce-form-coupon {
    padding: 2rem;
    border: 1px solid #ebebeb;
    margin-bottom: 3rem;
    background: #fff;
    border-radius: 4px;
}

.woocommerce-form-login .button,
.woocommerce-form-coupon .button {
    background-color: #333 !important;
    color: #fff !important;
    padding: 0.8rem 2rem;
    border: none;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: .05em;
}

.woocommerce-form-login .button:hover,
.woocommerce-form-coupon .button:hover {
    background-color: var(--wb-primary, #c96) !important;
}

/* Billing & Shipping Labels */
.checkout-page-container .woocommerce-billing-fields h3,
.checkout-page-container .woocommerce-shipping-fields h3,
.checkout-page-container .woocommerce-additional-fields h3 {
    font-family: var(--wb-font-family, 'Poppins', sans-serif);
    font-size: 2.4rem;
    font-weight: 500;
    margin-bottom: 3rem;
    color: #333;
    border-bottom: 1px solid #ebebeb;
    padding-bottom: 1rem;
}

.checkout-page-container .form-row {
    margin-bottom: 2rem;
}

.checkout-page-container .form-row label {
    display: block !important;
    width: 100%;
    font-weight: 300;
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.checkout-page-container .form-row label .required {
    color: #c96;
    text-decoration: none;
    border: none;
    font-weight: 700;
}

.checkout-page-container .form-row.notes label {
    display: block;
}

.checkout-page-container input.input-text,
.checkout-page-container textarea,
.checkout-page-container select {
    display: block;
    border: 1px solid #ebebeb;
    padding: 1rem 1.5rem;
    border-radius: 0;
    width: 100% !important;
    transition: all 0.3s ease;
    background-color: #fafafa;
    min-height: 50px;
    font-size: 1.4rem;
    font-weight: 300;
    box-sizing: border-box;
}

.checkout-page-container input.input-text:focus,
.checkout-page-container textarea:focus {
    border-color: #c96;
    outline: none;
    background-color: #fff;
    box-shadow: none;
}

/* Page Header & Title */
.page-header {
    padding: 4.5rem 0;
    background-color: #ebebeb;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    margin-bottom: 0;
}

.page-title {
    font-weight: 400;
    font-size: 4rem;
    letter-spacing: -.025em;
    margin-bottom: 0;
    color: #333;
}

.page-title span {
    display: block;
    font-size: 1.6rem;
    color: #c96;
    font-weight: 300;
    margin-top: 1rem;
}

.breadcrumb-nav {
    border-bottom: 1px solid #ebebeb;
    margin-bottom: 3.5rem;
}

.breadcrumb-nav .breadcrumb {
    padding: 1.5rem 0;
    margin-bottom: 0;
    background: transparent;
    border: none;
    display: flex;
    /* justify-content: center; */
}

.breadcrumb-item a {
    color: #777;
    transition: color 0.3s;
}

.breadcrumb-item a:hover {
    color: #c96;
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #333;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: '>';
    font-size: 1.2rem;
    color: #777;
    margin: 0 1rem;
    vertical-align: middle;
}

/* Select2 Custom Styling */
.select2-container--default .select2-selection--single {
    background-color: #fafafa;
    border: 1px solid #ebebeb;
    border-radius: 0;
    height: 50px;
    display: flex;
    align-items: center;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #666;
    font-size: 1.4rem;
    font-weight: 300;
    line-height: 50px;
    padding-left: 1.5rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 48px;
    right: 10px;
}

.select2-container--default .select2-selection--single:focus {
    outline: none;
}

.select2-container--open .select2-dropdown {
    border-color: #ebebeb;
    border-radius: 0;
    z-index: 9999;
}

/* Fix Woocommerce Grid */
.woocommerce-checkout .form-row {
    width: 100%;
    float: none;
    clear: both;
}

.woocommerce-checkout .form-row-first,
.woocommerce-checkout .form-row-last {
    width: 48% !important;
    float: left !important;
    clear: none !important;
}

.woocommerce-checkout .form-row-last {
    float: right !important;
}

.woocommerce-checkout .form-row::after {
    content: "";
    display: table;
    clear: both;
}

/* Ensure container has width */
.checkout-billing-fields,
.checkout-shipping-fields {
    width: 100%;
}

/* Order Review Table */
.woocommerce-checkout-review-order-table {
    width: 100%;
    margin-bottom: 2rem;
    border-collapse: collapse;
}

.woocommerce-checkout-review-order-table thead {
    display: table-header-group;
}

.woocommerce-checkout-review-order-table thead th {
    border-top: none;
    border-bottom: 1px solid #ebebeb;
    padding-bottom: 1rem;
    font-weight: 400;
    color: #333;
    font-size: 1.6rem;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    padding: 1.5rem 0;
    border-top: none;
    border-bottom: 1px solid #ebebeb;
    font-size: 1.4rem;
    vertical-align: middle;
}

.woocommerce-checkout-review-order-table tr:last-child th,
.woocommerce-checkout-review-order-table tr:last-child td {
    border-bottom: none;
}

.woocommerce-checkout-review-order-table .product-name {
    color: #666;
    font-weight: 300;
    line-height: 1.5;
}

.woocommerce-checkout-review-order-table .product-total {
    text-align: right;
    font-weight: 400;
    color: #333;
}

.woocommerce-checkout-review-order-table .cart-subtotal th,
.woocommerce-checkout-review-order-table .shipping th {
    text-align: left;
    font-weight: 400;
    color: #333;
}

.woocommerce-checkout-review-order-table .cart-subtotal td,
.woocommerce-checkout-review-order-table .shipping td {
    text-align: right;
    color: #1a1a1a;
}

.woocommerce-checkout-review-order-table .order-total th {
    font-size: 1.6rem;
    font-weight: 400;
    color: #c96;
}

.woocommerce-checkout-review-order-table .order-total td {
    font-size: 1.8rem;
    font-weight: 400;
    color: #c96;
    text-align: right;
}

/* Payment Methods */
#payment ul.payment_methods {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    border: none;
}

#payment ul.payment_methods li {
    margin-bottom: 0.5rem;
    padding: 1rem 0;
    border: none;
    border-radius: 0;
}

#payment ul.payment_methods li input {
    margin-right: 1.5rem;
}

#payment ul.payment_methods li label {
    font-weight: 300;
    color: #333;
    cursor: pointer;
    font-size: 1.4rem;
}

#payment .payment_box {
    background: transparent;
    padding: 1rem 0 1rem 3rem;
    margin-top: 0;
    font-size: 1.3rem;
    color: #777;
    border-top: none;
    font-weight: 300;
}

/* Place Order Button */
.checkout-page-container #place_order {
    width: 100%;
    background-color: transparent !important;
    color: #c96 !important;
    border: 1px solid #c96 !important;
    padding: 1.3rem 2rem;
    font-size: 1.4rem;
    text-transform: uppercase;
    font-weight: 400;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    border-radius: 0;
    margin-top: 2rem;
}

.checkout-page-container #place_order:hover {
    background-color: #c96 !important;
    color: #fff !important;
}

/* Sticky Sidebar */
@media (min-width: 992px) {
    .sticky-sidebar {
        position: sticky;
        top: 100px;
    }
}

/* Mobile Adjustments */
@media (max-width: 991px) {
    .order-summary-sidebar {
        margin-top: 3rem;
    }
}

/**
 * Checkout Quantity Edits
 */
.checkout-product-quantity {
    display: inline-flex;
    align-items: center;
    margin-left: 1rem;
    max-width: 90px;
    vertical-align: middle;
}

.checkout-product-quantity .input-spinner {
    margin-bottom: 0;
    flex-wrap: nowrap;
    border: 1px solid #ebebeb;
    border-radius: 4px;
    overflow: hidden;
    height: 30px;
}

.checkout-product-quantity .input-spinner input.form-control {
    height: 28px !important;
    padding: 0 !important;
    text-align: center;
    font-size: 1.3rem;
    border: none !important;
    width: 30px !important;
    background: #fff;
    color: #333;
}

.checkout-product-quantity .input-spinner .btn-spinner {
    width: 26px !important;
    height: 28px !important;
    padding: 0 !important;
    background: #f4f4f4;
    border: none;
    color: #666;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.checkout-product-quantity .input-spinner .btn-spinner:hover {
    background: #ebebeb;
    color: #c96;
}

.checkout-product-quantity .input-spinner .btn-spinner i {
    font-size: 0.8rem;
}

/* Hide original input when spinner is active */
.checkout-product-quantity input.qty {
    display: none !important;
}

/* Review table adjustments to fit quantity */
.woocommerce-checkout-review-order-table .product-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.woocommerce-checkout-review-order-table .product-name > a {
    flex-shrink: 0;
}

.woocommerce-checkout-review-order-table .product-total {
    white-space: nowrap;
}

@media (max-width: 575px) {
    .checkout-product-quantity {
        margin-left: 0;
        margin-top: 0.5rem;
        width: 100%;
    }
}