/**
 * All public-facing CSS for CargoHub
 */

/* Dimension Fields */
.cargohub-dimension-fields,
.cargohub-service-type,
.cargohub-cod-option {
    margin: 1.5em 0;
}

.cargohub-field-row {
    margin-bottom: 1em;
}

.cargohub-field-row label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 600;
}

.cargohub-checkbox-label {
    display: flex !important;
    align-items: center;
    font-weight: 600;
}

.cargohub-checkbox {
    margin-right: 8px !important;
}

.cargohub-input-field,
.cargohub-select-field {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.cargohub-dimensions-container {
    margin-top: 1em;
}

.cargohub-dimensions-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0.5em;
}

.cargohub-dimension-field {
    flex: 1;
    min-width: 120px;
    position: relative;
}

.cargohub-dimension-label {
    display: block;
    font-size: 0.85em;
    margin-top: 4px;
    color: #666;
}

.cargohub-separator {
    margin: 1.5em 0;
    border-top: 1px solid #eee;
    border-bottom: none;
}

.cargohub-price-calculation {
    margin: 1.5em 0;
    padding: 1em;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.cargohub-price-table {
    width: 100%;
    border-collapse: collapse;
}

.cargohub-price-table th,
.cargohub-price-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.cargohub-price-table th {
    width: 60%;
}

.cargohub-price-table td {
    text-align: right;
}

.cargohub-price-total {
    font-weight: bold;
}

/* Cart and Checkout */
.cargohub-cart-item-details {
    font-size: 0.85em;
    color: #666;
    margin-top: 0.5em;
}

.cargohub-cart-item-details p {
    margin: 0.2em 0;
}

.cargohub-service-badge {
    display: inline-block;
    padding: 2px 6px;
    margin-right: 5px;
    font-size: 0.75em;
    background-color: #f0f0f0;
    border-radius: 3px;
}

.cargohub-cod-badge {
    display: inline-block;
    padding: 2px 6px;
    margin-right: 5px;
    font-size: 0.75em;
    background-color: #ffe5e5;
    color: #d63638;
    border-radius: 3px;
}

/* Custom starting price display */
.cargohub-starting-price {
    margin: 10px 0 25px;
    padding: 15px;
    background-color: #f8f9fa;
    border-left: 4px solid #ff6600;
    border-radius: 4px;
}

.cargohub-starting-price .starting-from {
    font-size: 1.25em;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.cargohub-starting-price .amount {
    color: #ff6600;
    font-size: 1.4em;
}

.cargohub-price-tagline {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 0;
}

/* Hide any remaining price elements for courier products */
.product-type-simple .price,
.product-type-simple p.price,
.product-type-simple span.price,
.product-type-simple div.price,
.single-product .price:not(.starting-from) {
    display: none !important;
}

/* Only show our custom starting price */
.cargohub-starting-price .price,
.cargohub-starting-price p.price,
.cargohub-starting-price span.price {
    display: block !important;
}

.woocommerce-checkout .bank-details-field {
    padding: 10px;
    border-left: 3px solid #ff6600;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    .cargohub-dimensions-fields {
        flex-direction: column;
    }
    
    .cargohub-dimension-field {
        width: 100%;
    }
}