/*
 Theme Name:   Hello Elementor Child
 Theme URI:    https://outdoor.local
 Description:  Child theme for Hello Elementor – custom WooCommerce templates & overrides for Outdoor.ie
 Author:       Mark Griffin
 Author URI:   https://markjgriffin.ie
 Template:     hello-elementor
 Version:      1.0.0
 Requires at least: 6.0
 Requires PHP: 7.4
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  hello-elementor-child
*/

/* ==========================================================================
   Child theme styles go below this line.
   Parent theme styles are enqueued via functions.php.
   ========================================================================== */

/* ==========================================================================
   Shipping Methods — Cart & Checkout (Global)
   ========================================================================== */

/* Left-align shipping methods list */
.woocommerce-shipping-methods {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: left;
}

.woocommerce-shipping-methods li {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.woocommerce-shipping-methods li:last-child {
    border-bottom: none;
}

.woocommerce-shipping-methods input[type="radio"] {
    margin-top: 3px;
    flex-shrink: 0;
}

.woocommerce-shipping-methods label {
    flex: 1;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
}

/* ==========================================================================
   Local Pickup Plus — Pickup Location Fields (Global)
   ========================================================================== */

/* Pickup location field spans full width below its shipping method */
.pickup-location-field {
    flex-basis: 100%;
    margin: 10px 0 4px;
}

/* Select2 dropdown — clear borders, full width */
.pickup-location-field .select2-container {
    width: 100% !important;
}

.pickup-location-field .select2-container .select2-selection--single {
    height: 42px;
    border: 1px solid #d1d5db !important;
    border-radius: 4px !important;
    background: #fff;
}

.pickup-location-field .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 42px;
    padding-left: 12px;
    font-size: 14px;
    color: #333;
}

.pickup-location-field .select2-container .select2-selection--single .select2-selection__arrow {
    height: 42px;
}

/* Select2 dropdown results — grey hover, vertically centred text */
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: #f3f4f6 !important;
    color: #333 !important;
}

.select2-container--default .select2-results__option {
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.4;
}

.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: #e5e7eb !important;
    color: #333 !important;
}

/* Dropdown border and search field */
.select2-container--default .select2-dropdown {
    border-color: #d1d5db;
    border-radius: 4px;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    height: 38px;
    border-color: #d1d5db;
    border-radius: 4px;
    padding: 0 10px;
    font-size: 14px;
}

/* Selected location address display */
.pickup-location-field .pickup-location-address {
    font-size: 13px;
    color: #666;
    margin: 8px 0;
    line-height: 1.5;
}

/* Operating hours */
.pickup-location-field .pickup-location-schedule {
    font-size: 13px;
    color: #666;
}

.pickup-location-field .pickup-location-schedule ul {
    margin: 4px 0 8px 20px;
    padding: 0;
}

/* Appointment datepicker field */
.pickup-location-field .pickup-location-appointment {
    margin: 8px 0 4px;
}

.pickup-location-field .pickup-location-appointment-date {
    height: 42px;
    border: 1px solid #d1d5db !important;
    border-radius: 4px !important;
    padding: 0 12px;
    font-size: 14px;
    background: #fff;
}

/* ==========================================================================
   Cart Page — Shipping in Cart Totals
   ========================================================================== */

/* Ensure cart totals shipping cell aligns left */
.woocommerce-cart .cart_totals .woocommerce-shipping-totals td {
    text-align: left;
}

/* LPP wraps shipping packages in a nested table inside cart totals.
   Flatten the entire wrapper so its children render inline with the
   outer table cell. Use display:contents to remove the table/tr/td
   boxes while keeping their child nodes in flow. */
.cart_totals table.lpp-shipping-package-wrapper,
.cart_totals table.lpp-shipping-package-wrapper tbody,
.cart_totals table.lpp-shipping-package-wrapper tr,
.cart_totals table.lpp-shipping-package-wrapper td {
    display: contents !important;
}

.cart_totals table.lpp-shipping-package-wrapper th {
    display: none !important;
}

/* Prevent the responsive table's td::before from showing a duplicate
   "Shipment" label inside the flattened LPP wrapper. */
.cart_totals table.lpp-shipping-package-wrapper td::before {
    display: none !important;
}
