/* Measurement Options container */
.measurement-options {
    width: 48%;
    float: left;
}

/* Modal overlay */
.measurement-options-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.measurement-options-modal.open {
    opacity: 1;
    display: block !important;
    visibility: visible;
}

/* Modal content container */
.measurement-options-modal-content {
    background: #fff;
    width: 90%;
    max-width: 800px;
    max-height: 100vh; /* 90% of the viewport height */
    margin: 5vh auto; /* Center vertically using viewport units */
    padding: 20px 0px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow-y: auto; /* Scroll if content exceeds max height */
    animation: slideIn 0.3s ease-out;
}


/* Optional: If you have an internal wrapper for product options */
.measurement-product-options-wrapper {
    max-height: calc(90vh); /* Adjust based on header/footer space within modal */
    overflow-y: auto;
}

.measurement-product-header {
    padding: 20px;
}

.measurement-product-option {
    border-bottom: 1px solid #ddd;
    padding: 20px;
}

.measurement-product-option h4 {
    font-size: 20px;
}

.measurement-product-options-wrapper .measurement-product-option:first-child {
    padding-top: 0;
}

.measurement-product-options-wrapper .measurement-product-option:last-child {
    border-bottom: none;
}

.measurement-product-options-wrapper p:last-child {
    padding: 20px 20px 0px 20px;
}

.measurement-product-options-wrapper .measurement-unit-option p:last-child {
    padding: 0;
    margin-bottom: 0;
    font-size: 14px;
    color: #333;
}

.measurement-excluded-products {
    padding: 0 20px;
}

.measurement-excluded-products .inner {
    padding: 1em;
    border: 1px solid red;
    margin: 1em 0;
}

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

/* Close button styling */
.close-measurement-modal {
    position: absolute;
    top: 6px;
    right: 20px;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #b59f62;
    /* background: transparent; */
    padding: 0;
    box-sizing: border-box;
    line-height: 1;
    background: #fff;
    border-radius: 100%;
}

/* When modal is open, prevent background scrolling */
body.modal-open {
    overflow: hidden;
}

/* Modern styling for each measurement unit option */
.measurement-unit-option.modern-option {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 12px;
    margin-bottom: 12px;
}

.measurement-unit-option .unit-label {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.option-item {
    margin-bottom: 8px;
}

.option-item label {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: background 0.2s ease;
    cursor: pointer;
}

.option-item label:hover {
    background: #f0f0f0;
}

.option-item input[type="radio"] {
    margin-right: 10px;
}

.option-text {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.measurement-price {
    font-size: 14px;
    font-weight: bold;
    color: #b59f62; /* Adjust to your preferred color */
    margin-left: 10px;
}

.measurement-options input[type="radio"] {
    background: #fff;
    border: 1px solid #dedede;
    color: #222;
    clear: none;
    cursor: pointer;
    display: inline-block;
    line-height: 0;
    height: 16px !important;
    margin: -2px 10px 0 0;
    outline: 0;
    padding: 0 !important;
    text-align: center;
    vertical-align: middle;
    width: 16px !important;
    min-width: 16px;
    -webkit-appearance: none;
    box-sizing: border-box;
    transition: .05s border-color ease-in-out;
}

.measurement-options input[type="radio"]:checked:before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 700;
    font-style: normal;
    color: #1eaa6a;
    font-size: 20px;
    display: inline-block;
    vertical-align: middle;
    width: 14px;
    speak: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 5px 0 0 0;
    line-height: 3px;
}

.measurement-options-inner {
    background: #d7f7e3;
    padding: 20px;
    border-radius: 6px;
}

.measurement-service-toggle label {
    display: block;
    margin-bottom: 10px;
}

.measurement-service-buttons {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.measurement-valid-postalcode-message {
    margin-bottom: 20px;
}

.measurement-service-btn {
    padding: 10px 20px;
    border: 1px solid #222222;
    background-color: #fff;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    font-weight: 600;
}

input[name="user_postalcode"] {
    padding: 4px 8px;
    -moz-appearance: textfield; /* Firefox */
}

input[name="user_postalcode"]::-webkit-outer-spin-button,
input[name="user_postalcode"]::-webkit-inner-spin-button {
    -webkit-appearance: none; /* Chrome, Safari, Edge */
    margin: 0;
}


.measurement-service-btn:hover {
    background-color: #f0f0f0;
}

.measurement-service-btn.active {
    background-color: #222222;
    color: #fff;
    border-color: #222222;
}

.measurement-options .footer-image {
    max-height: 400px;
}

@media screen and (max-width: 768px) {
    .measurement-options {
        width: 100%;
        margin-bottom: 20px;
    }

    .measurement-options .footer-image {
        max-height: 200px;
    }
}
