.farefreight-quick-shipping-container {
    position: relative;
    margin: 20px 0;
    width: 100%;
    clear: both;
    display: block;
}

.quick-shipping-button {
    margin: 0;
    display: block;
    margin-bottom: 10px;
}

#quick-shipping-button {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
}

#quick-shipping-button:hover {
    background-color: #005d8c;
}

/* Inline popup that expands below the button */
#farefreight-modal {
    display: none;
    position: relative; /* Changed from absolute to relative */
    width: 100%;
    margin-top: 10px; /* Space between button and popup */
    z-index: 90; /* Lower z-index to not float above other elements */
}

.modal-content {
    background-color: #fefefe;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    position: relative;
}

/* Remove the arrow pointing to the button */
.modal-content:after {
    display: none;
}

/* Additional styles to ensure proper containment */
.cart {
    position: relative; /* Ensure the form has relative positioning */
}

.close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

.heading-container {
    text-align: center;
    margin-bottom: 15px;
}

.heading-container h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

/* Form styling */
.farefreight-form {
    padding: 0;
}

/* Modified: Stack form fields vertically instead of horizontally */
.location-row {
    display: flex;
    flex-direction: column; /* Changed from row to column */
    width: 100%;
    gap: 10px;
    margin-bottom: 15px;
}

.location-row input,
.location-row select {
    width: 100%; /* Full width for mobile */
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.button-container {
    text-align: center;
    margin-top: 15px;
}

.get-quote-btn {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px;
    font-size: 14px;
}

.get-quote-btn:hover {
    background-color: #005d8c;
}

.response {
    margin-top: 15px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
    min-height: 20px;
    font-size: 14px;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin: 15px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Info icon and tooltip styles */
.farefreight-info-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 50%;
    background-color: #0073aa;
    color: white !important;
    font-size: 10px;
    cursor: help;
    margin: 0 6px;
}

.ui-tooltip.farefreight-tooltip {
    max-width: 250px;
    padding: 8px;
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-size: 13px;
    line-height: 1.4;
}

/* Compact shipping options display */
.farefreight-shipping-options {
    width: 100%;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.farefreight-shipping-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

.farefreight-service-name {
    font-weight: bold;
    flex: 1;
    font-size: 14px;
}

.farefreight-price {
    font-weight: bold;
    font-size: 14px;
}