@font-face {
    font-family: 'YekanBakhFaNum';
    src: url('../../assets/YekanBakhFaNum-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

body,
html {
    overflow: hidden;
    /* Disable scrolling */
    height: 100%;
    /* Ensure body and html take full height */
    margin: 0;
    /* Remove default margin */
    touch-action: manipulation;
    -ms-touch-action: manipulation;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'YekanBakhFaNum', sans-serif;
    /* width: 80%; */
    height: 100vh;
    direction: rtl;
    font-size: 12pt;
    /* padding: 20px; */
    /* padding-left: 20px; */
    /* padding-right: 20px; */
    overflow: hidden;
    display: flex;
    -webkit-tap-highlight-color: transparent;
}

/* Hide scrollbars for all elements */
* {
    scrollbar-width: none;
    /* For Firefox */
    -ms-overflow-style: none;
    /* For Internet Explorer and Edge */
}

/* Hide scrollbars for WebKit browsers (Chrome, Safari) */
*::-webkit-scrollbar {
    display: none;
}

button {
    -webkit-appearance: none;
    /* Remove default iOS styles */
    appearance: none;
    /* For cross-browser support */
    color: inherit;
    /* Use the inherited text color */
    background-color: inherit;
    /* Ensure background color doesn't change */
    border: none;
    /* Remove any default borders */
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    touch-action: manipulation;
}

.main-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    /* Gap between the buttons */
    overflow: auto;
}

/* Input container styling */
.input-container {
    width: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

/* Close Button */
.close {
    position: fixed;
    /* Use fixed to ensure proper layering and behavior */
    font-size: 28px;
    color: white;
    font-weight: bold;
    z-index: 1001;
    cursor: pointer;
}

.closeSs {
    left: 20px;
    /* Positioning */
    top: 5vh;
    /* Positioning */
}

.closeSst {
    left: 20px;
    /* Positioning */
    top: 5vh;
    /* Positioning */
}

.closeSsReocrding {
    left: 20px;
    /* Positioning */
    top: 5vh;
    /* Positioning */
}

.input-container button {
    -webkit-appearance: none;
    appearance: none;
    padding: 5px;
    font-family: 'YekanBakhFaNum', sans-serif;
    font-weight: bold;
    text-align: center;
    width: 100%;
    height: 50px;
    color: black;
    background-color: #d2d2d2;
    border-radius: 50px;
    overflow: hidden;
    height: 45px;
    border: none;
    box-sizing: border-box;
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
}

/* Modal styling */
.modal {
    display: none;
    /* Hide modals by default */
    position: fixed;
    /* Use fixed to cover the entire viewport */
    z-index: 1011;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    backdrop-filter: blur(10px);
    /* Applies the blur effect */
    -webkit-backdrop-filter: blur(10px);
    /* Ensures compatibility with iOS Safari */
    background-color: rgba(0, 0, 0, 0.5);
    /* Fallback for older browsers */
    border-radius: 36px;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
}

/* Modal Content */
.modal-content {
    margin-top: 40px;
    margin-bottom: 20px;
    margin-left: 20px;
    margin-right: 20px;
    /* Changed to positive value */
    background-color: rgb(211, 211, 211);
    border-radius: 36px;
    padding: 0px;
    border: none;
    width: calc(100% - 40px);
    /* Adjust width to account for margins */
    height: calc(100% - 60px);
    /* Adjust height to account for margins */
    max-height: 100vh;
    /* Ensure it doesn't exceed the viewport height */
    overflow: auto;
    /* Add scroll if content exceeds viewport */
    position: relative;
    /* Relative positioning for close button and image */
}

.ss {
    height: 90%;
    width: 100%;
}

.sst {
    height: 90%;
    width: 100%;
}

.ssReocrding {
    height: 90%;
    width: 100%;
}

/* Additional CSS for fading and moving the close button */
.close-original {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.close-fading {
    opacity: 0;
}

.close-off-screen {
    opacity: 0;
    transform: translateX(100vw);
}

.ssImage,
.sstImage,
.ssRImage {
    position: fixed;
    width: 50px;
    height: 50px;
    display: none;
    /* Hidden by default */
    z-index: 1012;
    /* Ensure it is on top of other content */
    right: 5px;
    /* Ensure it aligns correctly */
    top: 5px;
    /* Ensure it aligns correctly */
}

/* Landscape mode styles */
@media (orientation: landscape) {
    .main-container .input-container:first-child {
        margin-top: 170px;
    }

    .main-container .input-container:last-child {
        margin-bottom: 20px;
    }
}