.woocommerce-add-shipping {
    margin-top: 20px;
}

.woocommerce-add-shipping .button {
    background-color: #eee;
    border: 1px solid #ccc;
    padding: 10px 20px;
    display: inline-block;
}

#fme-msa-label-address {
    text-align: center;
}



.fme-msa-class_address_container{
    height: 40px;
}



/* new changes */








/* --- Modal Container --- */
.fme-msa-modal {
    display: flex; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

/* --- Modal Content Box --- */
.msa-modal-content {
    background: #fff;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
}

/* --- Modal Close Button --- */
.msa-modal-close-edit,
.msa-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10%;
    /* transition: background-color 0.2s; */
}

.msa-modal-close-edit,
.msa-modal-close:state {
    background-color: #f0f0f0;
}

/* --- Modal Title --- */
.msa-modal-title {
    margin: 0 0 25px 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

/* --- Form Layout --- */
#msa-modal-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.msa-form-field {
    display: flex;
    flex-direction: column;
}

.msa-form-row {
    display: flex;
    gap: 10px;
}

.msa-form-row > .msa-form-field {
    flex: 1;
}

.msa-form-field-country {
    max-width: 49%;
}

.select-state-for-country {
    display: none; /* Managed by JS */
}

/* --- Form Elements --- */
.msa-form-label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}



.msa-form-optional {
    color: #888;
}








/* --- Modal Container --- */
.fme-msa-modal-edit {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

/* --- Modal Content Box --- */
.msa-modal-edit-content {
    background: #fff;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
}

/* --- Modal Close Button --- */
/* .msa-modal-close-edit {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
} */

/* .msa-modal-close-edit:hover {
    background-color: #f0f0f0;
} */

/* --- Modal Title --- */
.msa-modal-edit-title {
    margin: 0 0 25px 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}






.msa-form-input,
.msa-form-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #eee;
}







/* Read-only specific styles */

.msa-form-input-readonly,
.msa-form-select-disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

.msa-checkbox-disabled {
    cursor: not-allowed;
}

/* --- Submit Button (for edit form) --- */
.msa-submit-button {
    /* width: 100%; */
    padding: 12px;
    background: #3B74B0;;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 10px;
    /* transition: background-color 0.2s; */
}






/* edit form styles */



/* --- Modal Container & Overlay --- */
#fme-msa-modal-edit {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.msa-modal-content {
    background: #fff;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
}

.msa-modal-close-edit {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10%;
    transition: background-color 0.2s;
}



/* --- Form General Styling --- */
.msa-modal-content h2 {
    margin: 0 0 25px 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

#msa-modal-form-edit {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* --- Form Fields & Labels --- */
#msa-modal-form-edit label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

#msa-modal-form-edit input[type="text"],
#msa-modal-form-edit input[type="email"],
#msa-modal-form-edit input[type="tel"],
#msa-modal-form-edit select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.msa-form-input:focus,
.msa-form-select:focus,
#msa-modal-form-edit input:focus,
#msa-modal-form-edit select:focus {
    /* border-color: #3B74B0;; */
    /* box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2); */
    outline: none;
}

/* --- Form Layout Utilities --- */


.form-col {
    flex: 1;
}

.country-column {
    max-width: 49%; /* To maintain original layout with gap */
}

.select-state-for-country {
    display: none; /* This will be shown via JavaScript */
}

/* --- Helper Text --- */
.required-asterisk {
    color: #3B74B0;;
}

.optional-text {
    color: #888;
    font-weight: 400;
}

/* --- Submit Button --- */
#update-edit-address {
    /* width: 100%; */
    padding: 12px;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 10px;
    /* transition: background-color 0.2s; */
}



/* view file changes */




#fme_ship_to_different_address{
    display: none;
}



.fmw-btn-wrapper {
    text-align: center; /* centers inline/inline-block elements like buttons */
}

.fme-my-btn {
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    margin-top: 2%;
}


.fme-btn-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center; /* horizontal */
    align-items: center;     /* vertical */
    height: 100px; /* or container height */
  
}







/* chechout */




 /* Page wrapper to contain component styles */
        .fme-page-wrapper {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            background-color: #f9f9f9;
            color: #333;
            padding: 2rem;
            width: 150%;
        }

        /* Main Container */
        .fme-shipping-container {
            max-width: 900px;
            margin: auto;
            background-color: #fff;
            padding: 2rem;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }

        /* Title */
        .fme-main-title {
            font-size: 1.5rem;
            font-weight: 600;
            margin-bottom: 2rem;
            color: #1a1a1a;
        }
        
        /* Header Grid */
        .fme-header-grid {
            display: grid;
            /* 1st column for product, 2nd for qty/address */
            grid-template-columns: 2fr 4fr; 
            gap: 1.5rem;
            margin-bottom: 1rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid #e0e0e0;
        }

        .fme-header-grid .fme-header-title:last-child {
            display: grid;
            /* Sub-grid for Qty and Address headers */
            grid-template-columns: 1fr 3fr;
            gap: 1.5rem;
        }

        .fme-header-title {
            font-size: 0.8rem;
            font-weight: 600;
            color: #666;
            text-transform: uppercase;
        }

        /* Main container for a single product and its address rows */
        .fme-product-group {
            display: flex;
            gap: 1.5rem;
            padding: 1.5rem 0;
            border-bottom: 1px solid #e0e0e0;
        }
        .fme-product-group:last-of-type {
            border-bottom: none;
            padding-bottom: 0;
        }

        /* Product Info Cell (Name/Image) */
        .fme-product-info {
            display: flex;
            align-items: center;
            gap: 1rem;
            flex-basis: calc((100% / 6) * 2); /* Matches 2fr of 6 total fr */
            align-self: flex-start; /* Aligns to the top */
            padding-top: 0.5rem; /* Align with first input row */
        }

        .fme-product-image {
            width: 60px;
            height: 60px;
            border-radius: 4px;
            object-fit: cover;
        }

        .fme-product-name {
            font-weight: 500;
        }

        /* Container for all quantity/address rows for one product */
        .fme-split-items-container {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            gap: 1rem;
            margin-left: 80px;
        }

        /* A single row with Qty input, Address select, and Remove button */
        .fme-split-item-row {
            display: grid;
            grid-template-columns: 1fr 3fr;
            gap: 1.5rem;
            align-items: center;
        }
        
        .fme-address-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }

        /* Input and Select Styles */
        .fme-input,
        .fme-select {
            width: 100%;
            padding: 0.75rem;
            border: 1px solid #ccc;
            border-radius: 4px;
            font-size: 0.9rem;
            background-color: #fff;
            box-sizing: border-box; 
        }
        
        .fme-input {
            max-width: 80px; 
        }

        .fme-select {
            appearance: none;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 0.75rem center;
            background-size: 1em;
            padding-right: 2.5rem; 
        }

        /* Remove button ('x') */
        .fme-remove-btn {
            background: #e0e0e0;
            color: #333;
            border: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            font-weight: bold;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-left: 0.75rem;
            flex-shrink: 0;
            line-height: 1;
        }
        .fme-remove-btn:hover {
            background: #d0d0d0;
        }
        
        /* Hide remove button if it's the only one */
        .fme-split-item-row:only-child .fme-remove-btn {
            display: none;
        }

        /* Add another address link */
        .fme-add-address-link {
            font-size: 0.85rem;
            color: #007bff;
            text-decoration: none;
            font-weight: 500;
            cursor: pointer;
            margin-top: 0.5rem;
            display: inline-block;
        }

        .fme-add-address-link:hover {
            text-decoration: underline;
        }





        /* checkout pop */




        /* Container styling */
.fme-msa-wrapper {
    border: none;
    font-family: Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto;
}

/* Add address button */
.fme-msa-add-address {
    background: #e9f7f4;
    padding: 15px;
    text-align: center;
    border: 1px dashed #85c1b8;
    margin-bottom: 20px;
}

.fme-msa-btn-add {
    background: none;
    border: none;
    color: #229d7d;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
}

.fme-msa-btn-add:hover {
    text-decoration: underline;
}

/* Section title */
.fme-msa-section-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

/* Product row */
.fme-msa-product-row {
    display: grid;
    grid-template-columns: 60px 1fr 80px 1.8fr;
    gap: 10px;
    align-items: center;
    padding: 3px 0;
    /* border-bottom: 1px solid #eee; */
}

/* Product image */
.fme-msa-product-img img {
    width: 60px;
    height: auto;
    border-radius: 5px;
}

/* Product name */
.fme-msa-product-name {
    font-size: 14px;
    font-weight: 500;
}

/* Quantity */
.fme-msa-qty input {
    width: 60px;
    padding: 5px;
    font-size: 14px;
}

/* Address dropdown */
.fme-msa-address-select {
    position: relative;
    display: flex;
    align-items: center;
}

.fme-msa-address-select select {
    width: 100%;
    padding: 5px 35px 5px 8px;
    font-size: 14px;
}

/* Remove button */
.fme-msa-remove-item {
    /* position: absolute; */
    right: 5px;
    background: #333;
    color: white;
    border: none;
    font-size: 14px;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    line-height: 16px;
    padding: 0;
    margin-left: 1%;
}

.fme-msa-remove-item:hover {
    background: red;
}

/* Add another address link */
.fme-msa-add-more {
    padding-left: 70px;
    margin-bottom: 10px;
    float: right;
    margin-top: -2%;
}

.fme-msa-add-more a {
    font-size: 13px;
    color: #229d7d;
    text-decoration: none;
}

.fme-msa-add-more a:hover {
    text-decoration: underline;
}


.divider-row{
border-bottom: 1px solid #eee;
margin-top: 6%;
margin-bottom: 4%;

}


.divider-row-without-line{
/* border-bottom: 1px solid #eee; */
margin-top: 10%;

}



.fme-msa-modal-split-content{

    
    background: #fff;
    padding: 30px;
    max-width: 550px;
    width: 90%;
    max-height: 90vh;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
}




/* Target your specific select */
#split-shipping-address-select {
    position: relative;
    width: 100%;
}

/* If using a custom dropdown library */
.select-dropdown-container {
    position: relative;
    z-index: 1050; /* Higher than modal backdrop */
}

/* For native select styling */
#split-shipping-address-select {
    max-height: 150px;
    overflow-y: auto;
}

/* Modal specific constraints */
.modal-body {
    overflow: visible;
    min-height: 300px; /* Ensure space for dropdown */
}

.modal-content {
    overflow: visible;
    padding-bottom: 20px;
}


.fme-my-btn {
    cursor: pointer;
}





.fme-msa-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center; /* Centers horizontally */
    align-items: center;     /* Centers vertically */
    display: none;
}

/* Hidden state */
.fme-msa-loading-overlay.hidden {
    display: none;
}

/* Active/visible state */
.fme-msa-loading-overlay.active {
    display: flex;
}

.fme-msa-loader {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.fme-msa-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

.fme-msa-loading-text {
    color: #fff;
    font-size: 16px;
    margin: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.msa-required-asterisk{
    color: red !important;

}




/* Error styling for form fields */
.fme-msa-error {
    border: 2px solid #dc3545 !important;
    border-radius: 4px !important;
    background-color: #fff5f5 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
    transition: all 0.15s ease-in-out;
}

.fme-msa-error:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5) !important;
    outline: 0 !important;
}

/* Error message styling */
.error-message {
    color: #dc3545;
    font-size: 0.875em;
    margin-top: 0.25rem;
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Error label styling */
label.error-label {
    color: #dc3545 !important;
    font-weight: bold !important;
}

/* Shake animation for empty fields */
.fme-msa-error.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}