const modalStyle = document.createElement('style');
modalStyle.textContent = `
    /* Ð¡Ñ‚Ð¸Ð»Ð¸ Ð´Ð»Ñ Ð¼Ð¾Ð´Ð°Ð»ÑŒÐ½Ð¾Ð³Ð¾ Ð¾ÐºÐ½Ð° */
    #mmyMModal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    animation: .3s ease 0s normal none 1 running fadeIn;
    }
    
    #mmyMModal .mmodal-content {
    box-sizing: border-box;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: #fefefe;
    padding: 20px;
    border: 1px solid #888;
    max-width: 600px;
    width: 80%;
    max-height: 80vh;
    overflow-y: auto;
    text-align: center;
    font-weight: 800;
    color: black;
    border-radius: 10px;
    }
    
    #mmyMModal .ccloseWWindow {
    color: #aaa;
    position: absolute;
    top: -3px;
    right: 5px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 9999;
    }
    
    #mmyMModal .ccloseWWindow:hover,
    #mmyMModal .ccloseWWindow:focus {
    color: black;
    text-decoration: none;
    }
    
    #mmyMModal .mmodal-ttext {
        all: initial;
        font-size: 25px;
        font-weight: 700;
        font-family: Roboto, sans-serif;
        text-transform: uppercase;
        }
    
        #mmyMModal .success_icon {
        all: initial;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 20px;
        }
    
        #mmyMModal .success_icon p {
        all: initial;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 50px;
        color: #fff;
        width: 100px;
        height: 100px;
        border-radius: 50%;
        text-align: center;
        line-height: 100px;
        position: relative;
        font-family: sans-serif;
        animation: .3s ease 0s normal none 1 running iconScale;
        }
    
        #mmyMModal .success_icon p::before {
        all: initial;
        content: "Ð¥";
        font-size: 50px;
        color: #fff;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        font-family: Roboto, sans-serif;
        }
    
        #mmyMModal .success_icon p::after {
        all: initial;
        content: "";
        position: absolute;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background-color: #ef2c2c;
        z-index: -1;
        }
    
        /* ÐÐ´Ð°Ð¿Ñ‚Ð¸Ð²Ð½Ñ‹Ðµ ÑÑ‚Ð¸Ð»Ð¸ Ð´Ð»Ñ Ð¼Ð¾Ð´Ð°Ð»ÑŒÐ½Ð¾Ð³Ð¾ Ð¾ÐºÐ½Ð° */
        @media only screen and (max-width: 768px) {
        #mmyMModal .mmodal-ccontent {
        padding: 30px;
        font-size: 16px;
      }
    
        #mmyMModal .success_icon p {
        font-size: 40px;
        width: 80px;
        height: 80px;
        line-height: 80px;
        }
      }
    
        @keyframes fadeIn {
        from {
        opacity: 0;
        }
        to {
        opacity: 1;
        }
      }
    
        @keyframes iconScale {
            0% {
        opacity: 0
        }
        100% {
        opacity: 1
    }
      }
        body.modal-open 
        {
        overflow: hidden;
        }`;

/* Ð¡Ð¾Ð·Ð´Ð°Ð½Ð¸Ðµ Ð¼Ð¾Ð´Ð°Ð»ÑŒÐ½Ð¾Ð³Ð¾ Ð¾ÐºÐ½Ð° */
const modalHTML = `
    <!-- ÐœÐ¾Ð´Ð°Ð»ÑŒÐ½Ð¾Ðµ Ð¾ÐºÐ½Ð¾ -->
    <div id="mmyMModal" class="mmodalWWindow">
    <div class="mmodal-content">
      <div class="modal-inner">
        <p id="eerror-ttitle" class="mmodal-ttext"></p>
        <div class="success_icon">
          <p class="closeIcon">X</p>
        </div>
        <span class="ccloseWWindow">&times;</span>
        <p id="mmodalTText" class="mmodal-ttext"></p>
      </div>
    </div>
    </div>
    `;

        // Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð´Ð»Ñ Ñ€Ð°ÑÑ‡ÐµÑ‚Ð° Ñ€Ð°Ð·Ð¼ÐµÑ€Ð° Local Storage
        function calculateLocalStorageSize() {
            let totalSize = 0;

            for (let i = 0; i < localStorage.length; i++) {
                let key = localStorage.key(i);
                let value = localStorage.getItem(key);
                totalSize += (key.length + value.length) * 2; // Ð¿Ñ€Ð¸Ð±Ð»Ð¸Ð·Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ñ‹Ð¹ Ñ€Ð°Ð·Ð¼ÐµÑ€ Ð² Ð±Ð°Ð¹Ñ‚Ð°Ñ…
            }

            // ÐšÐ¾Ð½Ð²ÐµÑ€Ñ‚Ð¸Ñ€ÑƒÐµÐ¼ Ð² ÐšÐ‘ Ð´Ð»Ñ ÑƒÐ´Ð¾Ð±ÑÑ‚Ð²Ð°
            let totalSizeKB = totalSize / 1024;

            return totalSizeKB.toFixed(2); // Ð¾ÐºÑ€ÑƒÐ³Ð»ÑÐµÐ¼ Ð´Ð¾ Ð´Ð²ÑƒÑ… Ð·Ð½Ð°ÐºÐ¾Ð² Ð¿Ð¾ÑÐ»Ðµ Ð·Ð°Ð¿ÑÑ‚Ð¾Ð¹
        }

        // Ð”Ð¾Ð±Ð°Ð²Ð»ÑÐµÐ¼ ÑÑ‚Ð¸Ð»Ð¸ Ð¸ HTML Ð´Ð»Ñ Ð¼Ð¾Ð´Ð°Ð»ÑŒÐ½Ð¾Ð³Ð¾ Ð¾ÐºÐ½Ð° Ð½Ð° ÑÑ‚Ñ€Ð°Ð½Ð¸Ñ†Ñƒ
        document.head.appendChild(modalStyle);
        document.body.insertAdjacentHTML('beforeend', modalHTML);

        // Ð”Ð¾Ð±Ð°Ð²Ð»ÑÐµÐ¼ Ð¾Ð±Ñ€Ð°Ð±Ð¾Ñ‚Ñ‡Ð¸Ðº ÑÐ¾Ð±Ñ‹Ñ‚Ð¸Ñ Ð½Ð° Ð¸ÐºÐ¾Ð½ÐºÑƒ "X" Ð² Ð¼Ð¾Ð´Ð°Ð»ÑŒÐ½Ð¾Ð¼ Ð¾ÐºÐ½Ðµ
        document.addEventListener('DOMContentLoaded', function () {
            var icon = document.querySelector('#mmyMModal .success_icon p');
            if (icon) {
                icon.addEventListener('click', function () {
                    icon.style.animation = 'iconScale 0.5s ease';
                    setTimeout(function () {
                        icon.style.animation = '';
                    }, 500);
                });
            }

            // Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð´Ð»Ñ Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð¼Ð¾Ð´Ð°Ð»ÑŒÐ½Ð¾Ð³Ð¾ Ð¾ÐºÐ½Ð° Ñ Ñ‚ÐµÐºÑÑ‚Ð¾Ð¼ Ð² Ð·Ð°Ð²Ð¸ÑÐ¸Ð¼Ð¾ÑÑ‚Ð¸ Ð¾Ñ‚ ÑÑ‚Ñ€Ð°Ð½Ñ‹
            function showModal(errorMessage, errorTitle) {
                var modal = document.getElementById('mmyMModal');
                var errorTitleElement = document.getElementById('eerror-ttitle');
                var modalTextElement = document.getElementById('mmodalTText');

                // Ð£ÑÑ‚Ð°Ð½Ð°Ð²Ð»Ð¸Ð²ÐºÐ° Ð·Ð°Ð³Ð¾Ð»Ð¾Ð²ÐºÐ° Ð¸ ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð¾Ð± Ð¾ÑˆÐ¸Ð±ÐºÐµ
                errorTitle = errorTitle.trim(); // Ð£Ð±Ð¸Ñ€Ð°ÐµÐ¼ Ð¿Ñ€Ð¾Ð±ÐµÐ»Ñ‹ Ð² Ð½Ð°Ñ‡Ð°Ð»Ðµ Ð¸ ÐºÐ¾Ð½Ñ†Ðµ ÑÑ‚Ñ€Ð¾ÐºÐ¸
                errorMessage = errorMessage.trim(); // Ð£Ð±Ð¸Ñ€Ð°ÐµÐ¼ Ð¿Ñ€Ð¾Ð±ÐµÐ»Ñ‹ Ð² Ð½Ð°Ñ‡Ð°Ð»Ðµ Ð¸ ÐºÐ¾Ð½Ñ†Ðµ ÑÑ‚Ñ€Ð¾ÐºÐ¸
                errorTitleElement.textContent = errorTitle;
                modalTextElement.textContent = errorMessage;

                // ÐžÑ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ðµ Ð¼Ð¾Ð´Ð°Ð»ÑŒÐ½Ð¾Ð³Ð¾ Ð¾ÐºÐ½Ð°
                modal.style.display = "block";

                // ÐŸÑ€Ð¸ Ð½Ð°Ð¶Ð°Ñ‚Ð¸Ð¸ Ð½Ð° Ð¥ Ð·Ð°ÐºÑ€Ñ‹Ñ‚ÑŒ Ð¼Ð¾Ð´Ð°Ð»ÑŒÐ½Ð¾Ðµ Ð¾ÐºÐ½Ð¾
                var span = document.querySelector("#mmyMModal .ccloseWWindow");
                span.onclick = function () {
                    modal.style.display = "none";
                    document.body.classList.remove('modal-open');
                }

                // ÐŸÑ€Ð¸ Ð½Ð°Ð¶Ð°Ñ‚Ð¸Ð¸ Ð½Ð° Ð»ÑŽÐ±Ð¾Ðµ Ð¼ÐµÑÑ‚Ð¾ Ð·Ð°ÐºÑ€Ñ‹Ñ‚ÑŒ Ð¼Ð¾Ð´Ð°Ð»ÑŒÐ½Ð¾Ðµ Ð¾ÐºÐ½Ð¾
                window.onclick = function (event) {
                    if (event.target == modal) {
                        modal.style.display = "none";
                        document.body.classList.remove('modal-open');
                    }
                }
                document.body.classList.add('modal-open');
            }

            // Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð´Ð»Ñ Ð¿Ñ€Ð¾Ð²ÐµÑ€ÐºÐ¸ ÑƒÐ½Ð¸ÐºÐ°Ð»ÑŒÐ½Ð¾ÑÑ‚Ð¸ Ð½Ð¾Ð¼ÐµÑ€Ð° Ñ‚ÐµÐ»ÐµÑ„Ð¾Ð½Ð°
            function checkPhoneNumber(event) {
                var form = event.target; // ÐŸÐ¾Ð»ÑƒÑ‡Ð°ÐµÐ¼ Ñ„Ð¾Ñ€Ð¼Ñƒ, Ð½Ð° ÐºÐ¾Ñ‚Ð¾Ñ€Ð¾Ð¹ Ð¿Ñ€Ð¾Ð¸Ð·Ð¾ÑˆÐ»Ð¾ ÑÐ¾Ð±Ñ‹Ñ‚Ð¸Ðµ
                var offer = form.querySelector('input[name="offer"]').value; // ÐŸÐ¾Ð»ÑƒÑ‡Ð°ÐµÐ¼ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ðµ Ð¿Ð¾Ð»Ñ "offer" Ð¸Ð· Ñ„Ð¾Ñ€Ð¼Ñ‹, Ð½Ð° ÐºÐ¾Ñ‚Ð¾Ñ€Ð¾Ð¹ Ð¿Ñ€Ð¾Ð¸Ð·Ð¾ÑˆÐ»Ð¾ ÑÐ¾Ð±Ñ‹Ñ‚Ð¸Ðµ (Ð¼ÐµÐ½ÑÐµÑ‚ÑÑ)
                var phone = form.querySelector('input[name="phone"]').value; // ÐŸÐ¾Ð»ÑƒÑ‡Ð°ÐµÐ¼ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ðµ Ð¿Ð¾Ð»Ñ "phone" Ð¸Ð· Ñ„Ð¾Ñ€Ð¼Ñ‹, Ð½Ð° ÐºÐ¾Ñ‚Ð¾Ñ€Ð¾Ð¹ Ð¿Ñ€Ð¾Ð¸Ð·Ð¾ÑˆÐ»Ð¾ ÑÐ¾Ð±Ñ‹Ñ‚Ð¸Ðµ
                var country = form.querySelector('input[name="country_code"]').value; // ÐŸÐ¾Ð»ÑƒÑ‡Ð°ÐµÐ¼ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ðµ Ð¿Ð¾Ð»Ñ "country_code" Ð¸Ð· Ñ„Ð¾Ñ€Ð¼Ñ‹, Ð½Ð° ÐºÐ¾Ñ‚Ð¾Ñ€Ð¾Ð¹ Ð¿Ñ€Ð¾Ð¸Ð·Ð¾ÑˆÐ»Ð¾ ÑÐ¾Ð±Ñ‹Ñ‚Ð¸Ðµ (Ð¼ÐµÐ½ÑÐµÑ‚ÑÑ)

                // ÐŸÐ¾Ð»ÑƒÑ‡Ð°ÐµÐ¼ Ð´Ð°Ð½Ð½Ñ‹Ðµ Ð¸Ð· LocalStorage
                var storagePhone123 = localStorage.getItem('storagePhone123');
                if (!storagePhone123) {
                    storagePhone123 = {};
                } else {
                    storagePhone123 = JSON.parse(storagePhone123);
                }

                // Ð‘Ð»Ð¾ÐºÐ¸Ñ€ÑƒÐµÐ¼ ÐºÐ½Ð¾Ð¿ÐºÑƒ
                var submitBtn = form.querySelector('button[type="submit"]');
                submitBtn.disabled = true;

                // ÐŸÑ€Ð¾Ð²ÐµÑ€ÐºÐ° ÑƒÐ½Ð¸ÐºÐ°Ð»ÑŒÐ½Ð¾ÑÑ‚Ð¸ Ð½Ð¾Ð¼ÐµÑ€Ð° Ñ‚ÐµÐ»ÐµÑ„Ð¾Ð½Ð° Ð´Ð»Ñ Ð²Ñ‹Ð±Ñ€Ð°Ð½Ð½Ð¾Ð³Ð¾ Ð¾Ñ„Ñ„ÐµÑ€Ð°
                if (storagePhone123.hasOwnProperty(offer) && storagePhone123[offer].includes(phone)) {
                    var errorMessage, errorTitle;
                    switch (country.toUpperCase()) {
                        case 'AL':
                            errorTitle = "Gabim";
                            errorMessage = "MÃ« vjen keq, keni dÃ«rguar tashmÃ« njÃ« kÃ«rkesÃ«."; // ÐÐ»Ð±Ð°Ð½ÑÐºÐ¸Ð¹ Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'RS':
                            errorTitle = "Ð“Ñ€ÐµÑˆÐºÐ°";
                            errorMessage = "Ð˜Ð·Ð²Ð¸Ð½Ð¸Ñ‚Ðµ, Ð²ÐµÑ› ÑÑ‚Ðµ Ð¿Ð¾Ð´Ð½ÐµÐ»Ð¸ Ð·Ð°Ñ…Ñ‚ÐµÐ²."; // Ð¡ÐµÑ€Ð±ÑÐºÐ¸Ð¹ Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'MK':
                            errorTitle = "Ð“Ñ€ÐµÑˆÐºÐ°";
                            errorMessage = "Ð˜Ð·Ð²Ð¸Ð½ÐµÑ‚Ðµ, Ð²ÐµÑœÐµ ÑÑ‚Ðµ Ð¿Ð¾Ð´Ð½ÐµÐ»Ðµ Ð±Ð°Ñ€Ð°ÑšÐµ."; // ÐœÐ°ÐºÐµÐ´Ð¾Ð½ÑÐºÐ¸Ð¹ Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'MX':
                            errorTitle = "Error";
                            errorMessage = "Lo siento, ya has enviado una solicitud."; // Ð˜ÑÐ¿Ð°Ð½ÑÐºÐ¸Ð¹ (ÐœÐµÐºÑÐ¸ÐºÐ°) Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'XK':
                            errorTitle = "Gabim";
                            errorMessage = "MÃ« vjen keq, keni dÃ«rguar tashmÃ« njÃ« kÃ«rkesÃ«."; // ÐšÐ¾ÑÐ¾Ð²ÑÐºÐ¸Ð¹ Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'GE':
                            errorTitle = "áƒ¨áƒ”áƒªáƒ“áƒáƒ›áƒ";
                            errorMessage = "áƒ¡áƒáƒ¬áƒáƒ áƒ›áƒáƒ¨áƒ áƒ£áƒ™áƒ•áƒ” áƒ’áƒáƒ›áƒáƒ’áƒ”áƒ’áƒ–áƒáƒ•áƒœáƒáƒ—."; // Ð“Ñ€ÑƒÐ·Ð¸Ð½ÑÐºÐ¸Ð¹ Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'BG':
                            errorTitle = "Ð“Ñ€ÐµÑˆÐºÐ°";
                            errorMessage = "Ð¡ÑŠÐ¶Ð°Ð»ÑÐ²Ð°Ð¼Ðµ, Ð²ÐµÑ‡Ðµ ÑÑ‚Ðµ Ð¸Ð·Ð¿Ñ€Ð°Ñ‚Ð¸Ð»Ð¸ Ð·Ð°ÑÐ²ÐºÐ°."; // Ð‘Ð¾Ð»Ð³Ð°Ñ€ÑÐºÐ¸Ð¹ Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'BA':
                            errorTitle = "Ð“Ñ€ÐµÑˆÐºÐ°";
                            errorMessage = "Ð˜Ð·Ð²Ð¸Ð½ÑÐ²Ð°Ð¼Ðµ ÑÐµ, Ð²ÐµÑ‡Ðµ ÑÑ‚Ðµ Ð¸Ð·Ð¿Ñ€Ð°Ñ‚Ð¸Ð»Ð¸ Ð·Ð°ÑÐ²ÐºÐ°."; // Ð‘Ð¾ÑÐ½Ð¸Ð¹ÑÐºÐ¸Ð¹ Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'HR':
                            errorTitle = "Ð“Ñ€ÐµÑˆÐºÐ°";
                            errorMessage = "Ð˜Ð·Ð²Ð¸Ð½ÐµÑ‚Ðµ, Ð²ÐµÑœÐµ ÑÑ‚Ðµ Ð¿Ð¾Ð´Ð½ÐµÐ»Ðµ Ð±Ð°Ñ€Ð°ÑšÐµ."; // Ð¥Ð¾Ñ€Ð²Ð°Ñ‚ÑÐºÐ¸Ð¹ Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'CO':
                            errorTitle = "Error";
                            errorMessage = "Lo siento, ya has enviado una solicitud."; // Ð˜ÑÐ¿Ð°Ð½ÑÐºÐ¸Ð¹ (ÐšÐ¾Ð»ÑƒÐ¼Ð±Ð¸Ñ) Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'MD':
                            errorTitle = "Eroare";
                            errorMessage = "Ne pare rau, ati trimis deja o cerere."; // ÐœÐ¾Ð»Ð´Ð°Ð²ÑÐºÐ¸Ð¹ Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'RO':
                            errorTitle = "Eroare";
                            errorMessage = "Ne pare rÄƒu, aÈ›i trimis deja o cerere."; // Ð ÑƒÐ¼Ñ‹Ð½ÑÐºÐ¸Ð¹ Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'KG':
                            errorTitle = "ÐšÐ°Ñ‚Ð°Ð°Ð»ÑƒÑƒÐ³Ð° Ñ‡Ð°Ñ‚Ñ‹Ð»Ð°Ñ‚";
                            errorMessage = "ÐšÐµÑ‡Ð¸Ñ€ÐµÑÐ¸Ð·, ÑÐ¸Ð· Ð¼ÑƒÑ€Ð¾Ð¶Ð°Ð°Ñ‚ Ð¶Ó©Ð½Ó©Ñ‚ÐºÓ©Ð½ Ð±Ð¾Ð»Ð³Ð¾Ð½ÑƒÐ·."; // ÐšÑ‹Ñ€Ð³Ñ‹Ð·ÑÐºÐ¸Ð¹ Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'TR':
                            errorTitle = "Hata";
                            errorMessage = "ÃœzgÃ¼nÃ¼z, zaten bir talep gÃ¶nderdiniz."; // Ð¢ÑƒÑ€ÐµÑ†ÐºÐ¸Ð¹ Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'PE':
                            errorTitle = "Error";
                            errorMessage = "Lo siento, ya has enviado una solicitud."; // Ð˜ÑÐ¿Ð°Ð½ÑÐºÐ¸Ð¹ (ÐŸÐµÑ€Ñƒ) Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'UZ':
                            errorTitle = "Xatolik";
                            errorMessage = "ÐšÐµÑ‡Ð¸Ñ€Ð¸Ð½Ð³, ÑÐ¸Ð· Ð¼ÑƒÑ€Ð¾Ð¶Ð°Ð°Ñ‚Ð½Ð¸ ÑŽÐ±Ð¾Ñ€Ð³Ð°Ð½ÑÐ¸Ð·."; // Ð£Ð·Ð±ÐµÐºÑÐºÐ¸Ð¹ Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'LK':
                            errorTitle = "à·€à·à¶»à¶¯à·’";
                            errorMessage = "à·ƒà¶¸à·à·€à·™à¶±à·Šà¶±, à¶”à¶¶ à¶¯à·à¶±à¶§à¶¸à¶­à·Š à·€à·’à¶¸à·ƒà·“à¶¸à¶§ à¶ºà·œà¶¸à·” à¶šà·…à·."; // Ð¨Ñ€Ð¸-Ð›Ð°Ð½ÐºÐ¸Ð¹ÑÐºÐ¸Ð¹ Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'GT':
                            errorTitle = "Error";
                            errorMessage = "Lo siento, ya has enviado una solicitud."; // Ð˜ÑÐ¿Ð°Ð½ÑÐºÐ¸Ð¹ (Ð“Ð²Ð°Ñ‚ÐµÐ¼Ð°Ð»Ð°) Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'HN':
                            errorTitle = "Error";
                            errorMessage = "Lo siento, ya has enviado una solicitud."; // Ð˜ÑÐ¿Ð°Ð½ÑÐºÐ¸Ð¹ (Ð“Ð¾Ð½Ð´ÑƒÑ€Ð°Ñ) Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'ME':
                            errorTitle = "Ð“Ñ€ÐµÑˆÐºÐ°";
                            errorMessage = "Ð˜Ð·Ð²Ð¸Ð½Ð¸Ñ‚Ðµ, Ð²Ñ‹ ÑƒÐ¶Ðµ Ð¿Ð¾Ð´Ð°Ð»Ð¸ Ð·Ð°Ð¿Ñ€Ð¾Ñ."; // Ð§ÐµÑ€Ð½Ð¾Ð³Ð¾Ñ€ÑÐºÐ¸Ð¹ Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'KZ':
                            errorTitle = "ÒšÐ°Ñ‚Ðµ";
                            errorMessage = "ÐšÐµÑˆÑ–Ñ€Ñ–Ò£Ñ–Ð·, ÑÑ–Ð· Ó™Ð»Ñ– Ð´Ðµ Ó©Ñ‚Ñ–Ð½Ñ–Ñˆ Ð¶Ñ–Ð±ÐµÑ€Ð³ÐµÐ½ÑÑ–Ð·."; // ÐšÐ°Ð·Ð°Ñ…ÑÐºÐ¸Ð¹ Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                        case 'FR':
                            errorTitle = "Erreur";
                            errorMessage = "DÃ©solÃ©, vous avez dÃ©jÃ  soumis une demande."; // Ð¤Ñ€Ð°Ð½Ñ†ÑƒÐ·ÑÐºÐ¸Ð¹ Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'PL':
                            errorTitle = "BÅ‚Ä…d";
                            errorMessage = "Przepraszamy, juÅ¼ wysÅ‚aÅ‚eÅ›(aÅ›) zapytanie."; // ÐŸÐ¾Ð»ÑŒÑÐºÐ¸Ð¹ Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'AZ':
                            errorTitle = "SÉ™hv";
                            errorMessage = "BaÄŸÄ±ÅŸlayÄ±n, siz artÄ±q bir tÉ™lÉ™b gÃ¶ndÉ™ribsiniz."; // ÐÐ·ÐµÑ€Ð±Ð°Ð¹Ð´Ð¶Ð°Ð½ÑÐºÐ¸Ð¹ Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'BO':
                            errorTitle = "Error";
                            errorMessage = "Lo siento, ya has enviado una solicitud."; // Ð˜ÑÐ¿Ð°Ð½ÑÐºÐ¸Ð¹ (Ð‘Ð¾Ð»Ð¸Ð²Ð¸Ñ) Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'IN':
                            errorTitle = "à¤¤à¥à¤°à¥à¤Ÿà¤¿";
                            errorMessage = "à¤•à¥à¤·à¤®à¤¾ à¤•à¤°à¥‡à¤‚, à¤†à¤ªà¤¨à¥‡ à¤ªà¤¹à¤²à¥‡ à¤¸à¥‡ à¤¹à¥€ à¤à¤• à¤…à¤¨à¥à¤°à¥‹à¤§ à¤­à¥‡à¤œ à¤¦à¤¿à¤¯à¤¾ à¤¹à¥ˆà¥¤"; // Ð˜Ð½Ð´Ð¸Ð¹ÑÐºÐ¸Ð¹ Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'BY':
                            errorTitle = "ÐŸÐ°Ð¼Ñ‹Ð»ÐºÐ°";
                            errorMessage = "ÐŸÑ€Ð°Ð±Ð°Ñ‡Ñ†Ðµ, Ð²Ñ‹ ÑžÐ¶Ð¾ Ð¿Ð°Ð´Ð°Ð»Ñ– Ð·Ð°ÑÑžÐºÑƒ."; // Ð‘ÐµÐ»Ð¾Ñ€ÑƒÑÑÐºÐ¸Ð¹ Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'CL':
                            errorTitle = "Error";
                            errorMessage = "Lo siento, ya has enviado una solicitud."; // Ð˜ÑÐ¿Ð°Ð½ÑÐºÐ¸Ð¹ (Ð§Ð¸Ð»Ð¸) Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'NP':
                            errorTitle = "à¤¤à¥à¤°à¥à¤Ÿà¤¿";
                            errorMessage = "à¤®à¤¾à¤« à¤—à¤°à¥à¤¨à¥à¤¹à¥‹à¤¸à¥, à¤¤à¤ªà¤¾à¤ˆà¤‚à¤²à¥‡ à¤ªà¤¹à¤¿à¤²à¥‡ à¤¨à¥ˆ à¤à¤• à¤…à¤¨à¥à¤°à¥‹à¤§ à¤ªà¤ à¤¾à¤à¤•à¤¾ à¤›à¤¨à¥à¥¤"; // ÐÐµÐ¿Ð°Ð»ÑŒÑÐºÐ¸Ð¹ Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'IT':
                            errorTitle = "Errore";
                            errorMessage = "Ci dispiace, hai giÃ  inviato una richiesta."; // Ð˜Ñ‚Ð°Ð»ÑŒÑÐ½ÑÐºÐ¸Ð¹ Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'EC':
                            errorTitle = "Error";
                            errorMessage = "Lo siento, ya has enviado una solicitud."; // Ð˜ÑÐ¿Ð°Ð½ÑÐºÐ¸Ð¹ (Ð­ÐºÐ²Ð°Ð´Ð¾Ñ€) Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'VE':
                            errorTitle = "Error";
                            errorMessage = "Lo siento, ya has enviado una solicitud."; // Ð˜ÑÐ¿Ð°Ð½ÑÐºÐ¸Ð¹ (Ð’ÐµÐ½ÐµÑÑƒÑÐ»Ð°) Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'CI':
                            errorTitle = "Erreur";
                            errorMessage = "DÃ©solÃ©, vous avez dÃ©jÃ  soumis une demande."; // Ð¤Ñ€Ð°Ð½Ñ†ÑƒÐ·ÑÐºÐ¸Ð¹ (ÐšÐ¾Ñ‚-Ð´'Ð˜Ð²ÑƒÐ°Ñ€) Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'CR':
                            errorTitle = "Error";
                            errorMessage = "Lo siento, ya has enviado una solicitud."; // Ð˜ÑÐ¿Ð°Ð½ÑÐºÐ¸Ð¹ (ÐšÐ¾ÑÑ‚Ð°-Ð Ð¸ÐºÐ°) Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'CZ':
                            errorTitle = "Chyba";
                            errorMessage = "OmlouvÃ¡me se, jiÅ¾ jste odeslal(a) Å¾Ã¡dost."; // Ð§ÐµÑˆÑÐºÐ¸Ð¹ Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'ZA':
                            errorTitle = "Fout";
                            errorMessage = "Jammer, u het reeds 'n versoek gestuur."; // ÐÑ„Ñ€Ð¸ÐºÐ°Ð°Ð½Ñ (Ð®ÐÐ ) Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'AR':
                            errorTitle = "Error";
                            errorMessage = "Lo siento, ya has enviado una solicitud."; // Ð˜ÑÐ¿Ð°Ð½ÑÐºÐ¸Ð¹ (ÐÑ€Ð³ÐµÐ½Ñ‚Ð¸Ð½Ð°) Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'KE':
                            errorTitle = "Error";
                            errorMessage = "Lo siento, ya has enviado una solicitud."; // Ð˜ÑÐ¿Ð°Ð½ÑÐºÐ¸Ð¹ (ÐšÐµÐ½Ð¸Ñ) Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'SN':
                            errorTitle = "Erreur";
                            errorMessage = "DÃ©solÃ©, vous avez dÃ©jÃ  soumis une demande."; // Ð¤Ñ€Ð°Ð½Ñ†ÑƒÐ·ÑÐºÐ¸Ð¹ (Ð¡ÐµÐ½ÐµÐ³Ð°Ð») Ð¿ÐµÑ€ÐµÐ²Ð¾Ð´
                            break;
                        case 'BD':
                            errorTitle = "à¦¤à§à¦°à§à¦Ÿà¦¿";
                            errorMessage = "à¦¦à§à¦ƒà¦–à¦¿à¦¤, à¦†à¦ªà¦¨à¦¿ à¦‡à¦¤à¦¿à¦®à¦§à§à¦¯à§‡ à¦à¦•à¦Ÿà¦¿ à¦…à¦¨à§à¦°à§‹à¦§ à¦ªà§à¦°à§‡à¦°à¦£ à¦•à¦°à§‡à¦›à§‡à¦¨à¥¤"; // Ð‘Ð°Ð½Ð³Ð»Ð°Ð´ÐµÑˆ
                            break;
                        case 'HU':
                            errorTitle = "Hiba";
                            errorMessage = "SajnÃ¡ljuk, mÃ¡r elkÃ¼ldte a kÃ©relmet."; // Ð’ÐµÐ½Ð³Ñ€Ð¸Ñ
                            break;
                        case 'LT':
                            errorTitle = "Klaida";
                            errorMessage = "AtsipraÅ¡ome, jÅ«s jau pateikÄ—te uÅ¾klausÄ…."; // Ð›Ð¸Ñ‚Ð²Ð°
                            break;
                        case 'AM':
                            errorTitle = "ÕÕ­Õ¡Õ¬";
                            errorMessage = "Õ‘Õ¡Õ¾Õ¸Ö„, Õ¡Ö€Õ¤Õ¥Õ¶ Õ¸Ö‚Õ²Õ¡Ö€Õ¯Õ¥Õ¬ Õ¥Ö„ Õ°Õ¡Ö€ÖÕ¸Ö‚Õ´Õ¨Ö‰"; // ÐÑ€Ð¼ÐµÐ½Ð¸Ñ
                            break;
                        case 'GA':
                            errorTitle = "Erreur";
                            errorMessage = "DÃ©solÃ©, vous avez dÃ©jÃ  soumis une demande."; // Ð“Ð°Ð±Ð¾Ð½
                            break;
                        case 'NG':
                            errorTitle = "Error";
                            errorMessage = "Sorry, you have already submitted a request."; // ÐÐ¸Ð³ÐµÑ€Ð¸Ñ
                            break;
                        case 'BE':
                            errorTitle = "Fout";
                            errorMessage = "Sorry, u heeft al een aanvraag ingediend."; // Ð‘ÐµÐ»ÑŒÐ³Ð¸Ñ
                            break;
                        case 'NI':
                            errorTitle = "Error";
                            errorMessage = "Lo siento, ya has enviado una solicitud."; // ÐÐ¸ÐºÐ°Ñ€Ð°Ð³ÑƒÐ°
                            break;
                        case 'LV':
                            errorTitle = "KÄ¼Å«da";
                            errorMessage = "Atvainojiet, jÅ«s jau esat iesnieguÅ¡i pieprasÄ«jumu."; // Ð›Ð°Ñ‚Ð²Ð¸Ñ
                            break;
                        case 'GH':
                            errorTitle = "Error";
                            errorMessage = "Sorry, you have already submitted a request."; // Ð“Ð°Ð½Ð°
                            break;
                        case 'AO':
                            errorTitle = "Erro";
                            errorMessage = "Desculpe, vocÃª jÃ¡ enviou uma solicitaÃ§Ã£o."; // ÐÐ½Ð³Ð¾Ð»Ð°
                            break;

                        default:
                            errorTitle = "Error";
                            errorMessage = "Sorry, you have already submitted an inquiry."; // ÐŸÐ¾ ÑƒÐ¼Ð¾Ð»Ñ‡Ð°Ð½Ð¸ÑŽ Ð°Ð½Ð³Ð»Ð¸Ð¹ÑÐºÐ¸Ð¹
                    }

                    showModal(errorMessage, errorTitle);

                    // Ð Ð°Ð·Ð±Ð»Ð¾ÐºÐ¸Ñ€Ð¾Ð²Ð°Ñ‚ÑŒ ÐºÐ½Ð¾Ð¿ÐºÑƒ Ñ‡ÐµÑ€ÐµÐ· 15 ÑÐµÐºÑƒÐ½Ð´
                    setTimeout(function () {
                        var submitBtn = form.querySelector('button[type="submit"]');
                        submitBtn.disabled = false;
                    }, 15000);

                    return false; // ÐžÑ‚Ð¼ÐµÐ½Ð¸Ñ‚ÑŒ Ð¾Ñ‚Ð¿Ñ€Ð°Ð²ÐºÑƒ Ñ„Ð¾Ñ€Ð¼Ñ‹
                }
                // Ð”Ð¾Ð±Ð°Ð²Ð»ÑÐµÐ¼ Ð½Ð¾Ð¼ÐµÑ€ Ñ‚ÐµÐ»ÐµÑ„Ð¾Ð½Ð° Ð² Ð´Ð°Ð½Ð½Ñ‹Ðµ LocalStorage
                if (!storagePhone123.hasOwnProperty(offer)) {
                    storagePhone123[offer] = [];
                }
                storagePhone123[offer].push(phone);

                // ÐžÐ±Ð½Ð¾Ð²Ð»ÑÐµÐ¼ Ð´Ð°Ð½Ð½Ñ‹Ðµ Ð² LocalStorage
                localStorage.setItem('storagePhone123', JSON.stringify(storagePhone123));

                return true;
            }

            // ÐÐ°Ñ…Ð¾Ð´Ð¸Ð¼ Ð²ÑÐµ Ñ„Ð¾Ñ€Ð¼Ñ‹ Ð½Ð° ÑÑ‚Ñ€Ð°Ð½Ð¸Ñ†Ðµ
            var forms = document.querySelectorAll('form');

            // Ð”Ð¾Ð±Ð°Ð²Ð»ÑÐµÐ¼ Event Listener Ð½Ð° ÐºÐ°Ð¶Ð´ÑƒÑŽ Ñ„Ð¾Ñ€Ð¼Ñƒ
            forms.forEach(function (form) {
                form.addEventListener('submit', function (event) {
                    if (!checkPhoneNumber(event)) {
                        event.preventDefault(); // ÐžÑ‚Ð¼ÐµÐ½ÑÐµÐ¼ Ð¾Ñ‚Ð¿Ñ€Ð°Ð²ÐºÑƒ Ñ„Ð¾Ñ€Ð¼Ñ‹, ÐµÑÐ»Ð¸ Ð¿Ñ€Ð¾Ð²ÐµÑ€ÐºÐ° Ð½Ðµ Ð¿Ñ€Ð¾ÑˆÐ»Ð°
                    }
                });
            });
        });

        // ÐŸÐ¾ÐºÐ°Ð·Ñ‹Ð²Ð°ÐµÐ¼ Ñ€Ð°Ð·Ð¼ÐµÑ€ Local Storage
        var localStorageSizeKB = calculateLocalStorageSize();
        console.log("Ð Ð°Ð·Ð¼ÐµÑ€ Local Storage: " + localStorageSizeKB + " KB");