/* ========================================
   ATTENDEE FIELDS STYLING
   ======================================== */

#traintrack-attendees-container {
    display: none;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #278d39;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(39, 141, 57, 0.15);
}

.attendee-field {
    display: none;
    margin-bottom: 15px;
}

.attendee-field label {
    display: block !important;
    font-weight: 600 !important;
    color: #278d39 !important;
    margin-bottom: 8px !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.attendee-field input[type="text"] {
    width: 100% !important;
    padding: 12px 15px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 6px !important;
    font-size: 16px !important;
    background: white !important;
    color: #333 !important;
    transition: border-color 0.3s ease !important;
    box-sizing: border-box !important;
}

.attendee-field input[type="text"]:focus {
    outline: none !important;
    border-color: #278d39 !important;
    box-shadow: 0 0 0 3px rgba(39, 141, 57, 0.1) !important;
}

.attendee-field input[type="text"]::placeholder {
    color: #999 !important;
    font-style: italic !important;
}

/* ========================================
   MOBILE CART FIXES
   ======================================== */

/* Fix cart container width */
.e-con-inner .e-cart__container {
    max-width: 1200px !important; /* Increased from 100% */
    margin: 40px auto !important;
    padding: 0 20px !important;
}

/* Fix product title color - ensure it's visible */
.e-cart__column-start .product-name,
.e-cart__column-start .product-name a {
    color: #2a3d26 !important; /* Dark green - ensure visibility */
    font-weight: 500 !important;
}

/* Override the rule that's hiding product titles */
.woocommerce table.shop_table_responsive tbody th,
.woocommerce-page table.shop_table_responsive tbody th,
.e-cart__column-start table.shop_table_responsive tbody th,
.e-cart__column-start .shop_table tbody th {
    display: table-cell !important; /* Force display instead of none */
}

/* Ensure product name cells are always visible */
.e-cart__column-start .shop_table td.product-name,
.e-cart__column-start .shop_table th.product-name {
    display: table-cell !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Limit product title width and allow wrapping */
.e-cart__column-start .shop_table td.product-name,
.e-cart__column-start .shop_table th.product-name {
    max-width: 200px !important; /* Limit width to prevent layout breaking */
    width: 200px !important;
    white-space: normal !important; /* Allow text to wrap */
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    line-height: 1.3 !important; /* Tighter line height for multiple lines */
    vertical-align: top !important; /* Align to top when wrapping */
    padding: 10px 15px !important;
}

/* Product title links should also wrap */
.e-cart__column-start .shop_table td.product-name a,
.e-cart__column-start .shop_table th.product-name a {
    display: inline-block !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    line-height: 1.3 !important;
}

/* Ensure cart totals labels are visible */
.e-cart__column-end .cart_totals th,
.e-cart__column-end .cart_totals td {
    display: table-cell !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Specifically ensure subtotal and total labels are visible */
.e-cart__column-end .cart_totals .cart-subtotal th,
.e-cart__column-end .cart_totals .order-total th {
    display: table-cell !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #2a3d26 !important;
    font-weight: 600 !important;
}

/* Ensure the labels text is visible */
.e-cart__column-end .cart_totals .cart-subtotal th:before,
.e-cart__column-end .cart_totals .order-total th:before {
    content: "" !important; /* Remove any pseudo-elements that might be hiding text */
}

/* Force display of all cart totals content */
.e-cart__column-end .cart_totals table {
    display: table !important;
    width: 100% !important;
}

.e-cart__column-end .cart_totals tr {
    display: table-row !important;
}

/* Available places display styling */
.available-places {
    margin-top: 8px !important;
    text-align: center !important;
}

.available-places small {
    color: #4a7043 !important;
    font-size: 0.85em !important;
    font-weight: 500 !important;
    background-color: #f8faf5 !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    border: 1px solid #e0e6d9 !important;
    display: inline-block !important;
}

/* Center Book Now buttons in course tables */
.course-variations-table td:last-child {
    text-align: center !important;
}

.course-variations-table .button,
.course-variations-table form {
    display: inline-block !important;
    margin: 0 auto !important;
}

/* Location link styling */
.course-variations-table .location-link {
    color: #4a7043 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.3s ease !important;
}

.course-variations-table .location-link:hover {
    color: #3a5c34 !important;
    text-decoration: underline !important;
}

/* Mobile styling for available places */
@media (max-width: 768px) {
    .available-places {
        margin-top: 6px !important;
    }
    
    .available-places small {
        font-size: 0.8em !important;
        padding: 3px 6px !important;
    }
}

/* Fix quantity selector arrows */
.e-cart__column-start .quantity {
    position: relative !important;
}

.e-cart__column-start .quantity input[type="number"] {
    -webkit-appearance: none !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

/* Add custom quantity arrows */
.e-cart__column-start .quantity::before,
.e-cart__column-start .quantity::after {
    content: "" !important;
    position: absolute !important;
    right: 8px !important;
    width: 0 !important;
    height: 0 !important;
    border-left: 4px solid transparent !important;
    border-right: 4px solid transparent !important;
    pointer-events: none !important;
}

.e-cart__column-start .quantity::before {
    top: 4px !important;
    border-bottom: 4px solid #4a7043 !important; /* Up arrow */
}

.e-cart__column-start .quantity::after {
    bottom: 4px !important;
    border-top: 4px solid #4a7043 !important; /* Down arrow */
}

/* Mobile-specific cart table fixes */
@media (max-width: 768px) {
    /* Force table to be responsive */
    .e-cart__column-start .shop_table {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        font-size: 12px !important;
    }
    
    /* Ensure table cells don't wrap */
    .e-cart__column-start .shop_table th,
    .e-cart__column-start .shop_table td {
        white-space: nowrap !important;
        padding: 8px 6px !important;
        font-size: 12px !important;
        min-width: 80px !important;
    }
    
    /* Make product name column wider on mobile */
    .e-cart__column-start .shop_table td.product-name {
        min-width: 120px !important;
        max-width: 200px !important;
        padding-right: 10px !important;
    }
    
    /* Make remove column smaller on mobile */
    .e-cart__column-start .shop_table td.product-remove {
        min-width: 40px !important;
        max-width: 50px !important;
        text-align: center !important;
    }
    
    /* Adjust quantity column */
    .e-cart__column-start .shop_table td.product-quantity {
        min-width: 60px !important;
        text-align: center !important;
    }
    
    /* Adjust price columns */
    .e-cart__column-start .shop_table td.product-price,
    .e-cart__column-start .shop_table td.product-subtotal {
        min-width: 70px !important;
        text-align: center !important;
    }
    
    /* Make quantity input smaller on mobile */
    .e-cart__column-start .quantity input {
        width: 50px !important;
        padding: 6px !important;
        font-size: 12px !important;
    }
    
    /* Ensure buttons are full width on mobile */
    .e-cart__column-start .actions .button,
    .e-cart__column-end .checkout-button {
        width: 100% !important;
        padding: 12px 10px !important;
        font-size: 14px !important;
        margin-bottom: 10px !important;
    }
    
    /* Fix cart totals on mobile */
    .e-cart__column-end .cart_totals {
        max-width: 100% !important;
        margin: 20px 0 !important;
        padding: 15px !important;
    }
    
    /* Ensure proper spacing between cart sections */
    .e-con-inner .e-cart__container {
        margin: 20px auto !important;
        padding: 0 10px !important;
        gap: 15px !important;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .e-cart__column-start .shop_table th,
    .e-cart__column-start .shop_table td {
        font-size: 11px !important;
        padding: 6px 4px !important;
    }
    
    .e-cart__column-start .product-thumbnail img {
        max-width: 50px !important;
    }
    
    .e-cart__column-start .quantity input {
        width: 40px !important;
        padding: 4px !important;
        font-size: 11px !important;
    }
}







