/* ==================== NOTICES STYLES ==================== */

/* Hide WooCommerce shipping debug notices (handled by JavaScript in checkout.js) */
.shipping-debug-notice {
    display: none !important;
}

/* Notices wrapper inside checkout container */
.checkout-page .container > .woocommerce-notices-wrapper {
    margin-bottom: 30px;
}
.checkout-page__wrapper {
    padding-top: 40px;
}
.checkout-page__form,
.wc-stripe-express-checkout-button-separator {
    margin-top: 2em;
}
.checkout-page {
    padding: 20px 0 80px !important;
}
.woocommerce-form-coupon-toggle {
    margin-top: 20px;
}
.woocommerce-error a {
    color: #111;
}

.order-summary__item--footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	grid-gap: 15px;
}
.order-summary__item-image {
	height: 140px;
}
.order-summary__row {
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
	padding-bottom: 15px
}

.order-summary__row--dpd {
	display: flex;
	flex-direction: column;
	grid-gap: 20px;
	align-items: flex-start;
}

.order-summary__row--dpd .required {
	display: none;
}

.order-summary__total {
	border: none;
	padding-top: 0;
}

/* ==================== HIDE SECTIONS ==================== */

/* Hide shipping address section completely */
.woocommerce-shipping-fields,
.checkout-section:has(.woocommerce-shipping-fields) {
    display: none !important;
}

/* Hide order notes field */
.woocommerce-additional-fields,
.woocommerce-additional-fields__field-wrapper,
#order_comments_field {
    display: none !important;
}

/* ==================== FORM INPUTS & SELECTS STYLES ==================== */

/* Input fields styling */
.checkout-page .checkout-section .input-text,
.checkout-page .checkout-section input[type="text"],
.checkout-page .checkout-section input[type="email"],
.checkout-page .checkout-section input[type="tel"] {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    font-family: Manrope, sans-serif !important;
    font-weight: 400 !important;
    color: #000 !important;
    background: #fff !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
    box-sizing: border-box !important;
}

.checkout-page .checkout-section .input-text:focus,
.checkout-page .checkout-section input[type="text"]:focus,
.checkout-page .checkout-section input[type="email"]:focus,
.checkout-page .checkout-section input[type="tel"]:focus {
    border-color: #176DAA !important;
    box-shadow: 0 0 0 3px rgba(23, 109, 170, 0.1) !important;
    outline: none !important;
}

.checkout-page .checkout-section .input-text::placeholder,
.checkout-page .checkout-section input::placeholder {
    color: #999 !important;
}

/* Select fields styling - same as inputs */
.checkout-page .checkout-section select,
.checkout-page .checkout-section .country_select,
.checkout-page .checkout-section .state_select {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    font-family: Manrope, sans-serif !important;
    font-weight: 400 !important;
    color: #000 !important;
    background-color: #fff !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    padding-right: 40px !important;
    cursor: pointer !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
    box-sizing: border-box !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
}

/* Prevent Select2 hidden state on all selects */
.checkout-page select.select2-hidden-accessible,
.order-summary select.select2-hidden-accessible,
select[name*="dpd"].select2-hidden-accessible,
select[name*="pickup"].select2-hidden-accessible,
select[name*="terminal"].select2-hidden-accessible {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    width: 100% !important;
}

/* Hide Select2 container if it appears anywhere in checkout */
.checkout-page .select2-container,
.order-summary .select2-container,
.woocommerce-checkout .select2-container {
    display: none !important;
}

/* Style all select elements in order summary (including DPD pickup points) */
.order-summary select,
.order-summary__totals select,
select[name*="dpd"],
select[name*="pickup"],
select[name*="terminal"],
.dpd-terminal-select,
#wc_shipping_dpd_parcels_terminal {
    width: 100% !important;
    padding: 4px 6px !important;
    border: 1px solid #ddd !important;
    border-radius: 0px !important;
    font-size: 12px !important;
    font-family: Manrope, sans-serif !important;
    font-weight: 400 !important;
    color: #000 !important;
    background-color: #fff !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    padding-right: 20px !important;
    cursor: pointer !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
    box-sizing: border-box !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    position: static !important;
}

.order-summary select:focus,
select[name*="dpd"]:focus,
select[name*="pickup"]:focus,
select[name*="terminal"]:focus,
.dpd-terminal-select:focus,
#wc_shipping_dpd_parcels_terminal:focus {
    border-color: #176DAA !important;
    box-shadow: 0 0 0 3px rgba(23, 109, 170, 0.1) !important;
    outline: none !important;
}

.order-summary select:hover,
select[name*="dpd"]:hover,
select[name*="pickup"]:hover,
select[name*="terminal"]:hover,
.dpd-terminal-select:hover,
#wc_shipping_dpd_parcels_terminal:hover {
    border-color: #999 !important;
}

/* Hide old custom DPD dropdown structure if it exists */
.custom-dropdown {
    display: none !important;
}

/* DPD terminal select wrapper */
.wc_shipping_dpd_terminals td {
    padding: 0 !important;
}

.wc_shipping_dpd_terminals select {
    margin: 0 !important;
}

.checkout-page .checkout-section select:focus,
.checkout-page .checkout-section .country_select:focus,
.checkout-page .checkout-section .state_select:focus {
    border-color: #176DAA !important;
    box-shadow: 0 0 0 3px rgba(23, 109, 170, 0.1) !important;
    outline: none !important;
}

.checkout-page .checkout-section select:hover,
.checkout-page .checkout-section .country_select:hover,
.checkout-page .checkout-section .state_select:hover {
    border-color: #999 !important;
}

/* ==================== COUPON STYLES ==================== */

/* Coupon form styling */
.woocommerce-form-coupon {
    margin-bottom: 20px;
}

.woocommerce-form-coupon .form-row {
    margin-bottom: 10px;
}

.woocommerce-form-coupon #coupon_code {
    padding: 12px 14px;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.woocommerce-form-coupon button[type="submit"] {
    width: 100%;
    height: 40px;
    line-height: 40px;
    background: #176daa;
    color: #fff;
    text-align: center;
    font-family: Manrope, sans-serif;
    font-weight: 700;
    margin-top: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.woocommerce-form-coupon button[type="submit"]:hover {
    background: #145a8c;
}

/* Order summary coupon styling */
.order-summary__item-title a {
	color: #111;
}

.order-summary__coupon #coupon_code,
.order-summary__coupon .input-text {
    padding: 12px 14px;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.order-summary__coupon button[type="button"].button {
    width: 100%;
    height: 40px;
    line-height: 40px;
    background: #176daa;
    color: #fff;
    text-align: center;
    font-family: Manrope, sans-serif;
    font-weight: 700;
    margin-top: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.order-summary__coupon button[type="button"].button:hover {
    background: #145a8c;
}

.order-summary__coupon {
	margin-bottom: 15px;
}

@media (max-width: 768px) {
	.checkout-actions .btn--secondary {
		order: 0 !important;
	}
}

/* TEMPORARILY COMMENTED OUT TO USE DEFAULT DPD HOOK */

/*
.order-summary__row--shipping {
    display: block !important;
    padding: 0 !important;
}

.order-summary__row--shipping > * {
    width: 100%;
}

.woocommerce-shipping-methods {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
	margin-top: 20px !important;
}

.woocommerce-shipping-methods li {
    position: relative;
    border: none !important;
    background: #f5f5f5;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
}

.woocommerce-shipping-methods li:hover {
    background: #e8e8e8;
}

.woocommerce-shipping-methods li.active,
.woocommerce-shipping-methods li:has(input[type="radio"]:checked) {
    background: #176DAA !important;
}

.woocommerce-shipping-methods input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.woocommerce-shipping-methods label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    margin: 0 !important;
    width: 100%;
}

.woocommerce-shipping-methods .shipping-method-name {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    transition: color 0.3s ease;
}

.woocommerce-shipping-methods li.active .shipping-method-name,
.woocommerce-shipping-methods li:has(input[type="radio"]:checked) .shipping-method-name {
    color: #fff !important;
}

.woocommerce-shipping-methods .woocommerce-Price-amount {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    transition: color 0.3s ease;
}

.woocommerce-shipping-methods li.active .woocommerce-Price-amount,
.woocommerce-shipping-methods li:has(input[type="radio"]:checked) .woocommerce-Price-amount {
    color: #fff !important;
}

.woocommerce-shipping-methods label::after {
    display: none !important;
}

.woocommerce-shipping-methods .shipping-method-description {
    font-size: 14px;
    color: #666;
    margin-top: 4px;
}

.order-summary__row.order-summary__row--shipping {
    border-top: 1px solid rgba(0, 0, 0, .1);
    padding-top: 15px !important;
}

.checkout-page__sidebar {
	top: 80px !important;
}

@media (max-width: 768px) {
    .woocommerce-shipping-methods label {
        padding: 14px 16px;
    }

    .woocommerce-shipping-methods .shipping-method-name {
        font-size: 15px;
    }

    .woocommerce-shipping-methods .woocommerce-Price-amount {
        font-size: 15px;
    }
}
*/

/* ==================== PAYMENT METHODS STYLES ==================== */

/* Hide all payment methods except Stripe */
.woocommerce-checkout-payment ul.payment_methods {
	display: flex;
	grid-gap: 20px;
	flex-direction: column;
}
.woocommerce-checkout-payment ul.payment_methods li:not([class*="stripe"]) {
/*     display: none !important; */
}

/* WooCommerce payment methods */
.woocommerce-checkout-payment {
    background: transparent;
}

.woocommerce-checkout-payment ul.payment_methods {
    list-style: none;
    padding: 0;
    margin: 0;
    border: none;
}

.woocommerce-checkout-payment ul.payment_methods li {
    margin: 0;
    padding: 0;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
}

/* Hide WooCommerce default terms block, but keep checkbox functional */
.form-row.place-order {
    display: none;
}

/* Hide the entire terms wrapper visually, but keep it in DOM for validation */
.woocommerce-terms-and-conditions-wrapper {
    display: none !important;
}

.checkout-section:last-child {
	padding-bottom: 0;
}

.woocommerce-checkout-payment ul.payment_methods li input[type="radio"] {
    display: none;
}

.woocommerce-checkout-payment ul.payment_methods li label {
    display: block;
    padding: 20px;
    cursor: pointer;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.woocommerce-checkout-payment ul.payment_methods li label img {
    max-height: 36px;
    margin-left: 10px;
    vertical-align: middle;
}

/* Payment box (Stripe form) */
.woocommerce-checkout-payment .payment_box {
    margin: 0;
    padding: 20px;
    background: #f8f9fa;
    border: none;
    border-top: 1px solid #e0e0e0;
    border-radius: 0 0 8px 8px;
}

.woocommerce-checkout-payment .payment_box p {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #666;
}

/* Stripe card element */
.payment_box .wc-stripe-elements-field,
.payment_box .stripe-card-element,
.payment_box #stripe-card-element {
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 12px 0;
    min-height: 40px;
}

.payment_box .wc-stripe-elements-field:focus,
.payment_box .stripe-card-element:focus {
    border-color: #176DAA;
    box-shadow: 0 0 0 3px rgba(23, 109, 170, 0.1);
    outline: none;
}

/* Payment box inputs */
.payment_box input[type="text"],
.payment_box input[type="email"],
.payment_box input[type="tel"],
.payment_box input[type="number"],
.payment_box select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    font-family: Manrope, sans-serif;
    font-weight: 400;
    color: #000;
    background: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    margin: 8px 0;
}

.payment_box input:focus,
.payment_box select:focus {
    border-color: #176DAA;
    box-shadow: 0 0 0 3px rgba(23, 109, 170, 0.1);
    outline: none;
}

/* Payment box labels */
.payment_box label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    margin-top: 12px;
}

.payment_box label:first-child {
    margin-top: 0;
}

/* Stripe errors */
.payment_box .wc-stripe-error {
    color: #F52222;
    font-size: 13px;
    margin-top: 8px;
}

/* Hide place order button from order review (we have it at the bottom) */
.woocommerce-checkout-review-order #place_order {
    display: none;
}

/* Order summary coupon toggle */
.order-summary__coupon-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 0;
    background: transparent;
    border-color:  transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    color: #000;
    font-family: Manrope, sans-serif;
}

.order-summary__coupon-toggle:hover {
    border-color: transparent;
}

/* Responsive */
@media (max-width: 768px) {
    .payment_box {
        padding: 16px;
    }

    .payment_box input,
    .payment_box select {
        font-size: 16px;
    }
}

/* ==================== ORDER RECEIVED / THANK YOU PAGE ==================== */

.woocommerce-order {
    padding: 40px 0 80px;
}

.woocommerce-thankyou-order-received {
    background: #f0f9ff;
    border-left: 4px solid #176DAA;
    padding: 20px;
    margin-bottom: 30px;
    font-size: 18px;
    font-weight: 500;
    color: #176DAA;
}

.woocommerce-order-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0 0 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 30px;
    background: #f8f8f8;
}

.woocommerce-order-overview li {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.woocommerce-order-overview li strong {
    font-size: 18px;
    color: #000;
}

.woocommerce-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.woocommerce-table thead {
    background: #f8f8f8;
}

.woocommerce-table th,
.woocommerce-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.woocommerce-table th {
    font-weight: 600;
    color: #000;
}

.woocommerce-table tfoot th,
.woocommerce-table tfoot td {
    border-top: 2px solid #ddd;
    font-weight: 600;
}

.woocommerce-customer-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.woocommerce-customer-details h2 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #000;
}

.woocommerce-customer-details address {
    font-style: normal;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .woocommerce-order-overview {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px;
    }

    .woocommerce-customer-details {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .checkout-section__header {
        flex-direction: column;
        align-items: flex-start;
        grid-gap: 14px;
    }
    .checkout-section__subtitle {
        font-size: 14px;
    }
}

/* ==================== ORDER SUMMARY PRICE VISIBILITY FIX ==================== */

/* Ensure Order Summary total price is always visible */
.order-summary__total-price {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ==================== FORM VALIDATION STYLES ==================== */

/* Invalid field styling */
.checkout-page .checkout-section input.woocommerce-invalid,
.checkout-page .checkout-section input.woocommerce-invalid-required-field,
.checkout-page .form-row.woocommerce-invalid input,
.checkout-page .form-row.woocommerce-invalid-required-field input {
    border-color: #e2401c !important;
}

.checkout-page .checkout-section input.woocommerce-invalid:focus,
.checkout-page .form-row.woocommerce-invalid input:focus {
    border-color: #e2401c !important;
    box-shadow: 0 0 0 3px rgba(226, 64, 28, 0.1) !important;
}

/* Error message styling */
.phone-error-message {
    color: #e2401c;
    font-size: 14px;
    margin-top: 4px;
    display: block;
    font-family: Manrope, sans-serif;
}

/* ==================== FORCE DISABLE SELECT2 EVERYWHERE ==================== */

/* Hide all Select2 containers and dropdowns */
.select2-container,
.select2-dropdown,
.select2-results,
span.select2-container {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Ensure all selects are visible and not hidden by Select2 */
select.select2-hidden-accessible {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    clip: auto !important;
    clip-path: none !important;
}

/* ==================== MOBILE CHECKOUT BUTTONS REPOSITIONING ==================== */

/* Hide mobile buttons on desktop */
.checkout-actions--mobile {
    display: none !important;
}

/* Mobile: Hide original buttons, show mobile buttons after order summary */
@media (max-width: 768px) {
    /* Hide original checkout actions on mobile */
    .checkout-page__main .checkout-actions:not(.checkout-actions--mobile) {
        display: none !important;
    }

    /* Show mobile checkout actions */
    .checkout-actions--mobile {
        display: flex !important;
        gap: 12px;
        margin-top: 20px;
        padding: 0;
    }

    .checkout-actions--mobile .btn {
        flex: 1;
    }
}

/* ==================== HIDE FORM LABELS (BUT KEEP FOR ERROR MESSAGES) ==================== */

/* Hide labels visually while keeping them in the DOM for:
   1. Screen readers (accessibility)
   2. Error messages (validation uses label text)
*/
.woocommerce-checkout .form-row label,
.woocommerce-account .form-row label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Exception: Show required asterisk if needed */
.woocommerce-checkout .form-row label .required,
.woocommerce-account .form-row label .required {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

