.papaya {
    width: 100%;
    height: calc(100vh - 10px);
    margin: 0;
    background-color: black;
    font-family: sans-serif;
    box-sizing: border-box;
}
.papaya:before {
    position: relative;
    content: "Papaya requires JavaScript...";
    display: block;
    top: 45%;
    color: red;
    margin: 0 auto;
    font-size: 18px;
    font-family: sans-serif;
}
.papaya-fullscreen {
    height: 100%;
    width: 100%;
    box-sizing: border-box;
}
.papaya-toolbar {
    text-align: left;
    box-sizing: content-box;
    position: relative;
}
.papaya-toolbar ul {
    margin: 0;
    list-style: none;
}
.papaya-toolbar input[type=file] {
    text-align: right;
    display: none;
}
.papaya-kiosk-controls {
    position: relative;
    margin: 5px auto;
    list-style: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.papaya-kiosk-controls ul {
    list-style: none;
}
.papaya-kiosk-controls button {
    -webkit-appearance: none;
    border-radius: 0;
    -webkit-border-radius: 0;
    font-size: 14px;
    height: 25px;
    background-color: lightgray;
}
.papaya-control-increment {
    -webkit-appearance: none;
    border-radius: 0;
    -webkit-border-radius: 0;
    font-size: 14px;
    height: 25px;
    width: 25px;
    text-align: center;
    vertical-align: middle;
    padding: 0;
    margin-left: auto;
    margin-right: auto;
    line-height: 16px;
    box-sizing: border-box;
    font-family: "Courier New", Courier, monospace;
}
.papaya-main-increment {
    -webkit-appearance: none;
    border-radius: 0;
    -webkit-border-radius: 0;
    font-size: 14px;
    height: 25px;
    width: 25px;
    text-align: center;
    font-family: "Courier New", Courier, monospace;
    background-color: lightgray;
    vertical-align: middle;
    padding: 0;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    outline: 0;
}
.papaya-main-decrement {
    -webkit-appearance: none;
    border-radius: 0;
    -webkit-border-radius: 0;
    font-size: 14px;
    height: 25px;
    width: 25px;
    text-align: center;
    font-family: "Courier New", Courier, monospace;
    background-color: lightgray;
    vertical-align: middle;
    padding: 0;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    outline: 0;
}
.papaya-main-swap {
    -webkit-appearance: none;
    border-radius: 0;
    -webkit-border-radius: 0;
    font-size: 14px;
    height: 25px;
    background-color: lightgray;
    outline: 0;
}
.papaya-main-goto-center {
    -webkit-appearance: none;
    border-radius: 0;
    -webkit-border-radius: 0;
    font-size: 14px;
    height: 25px;
    background-color: lightgray;
    outline: 0;
}
.papaya-main-goto-origin {
    -webkit-appearance: none;
    border-radius: 0;
    -webkit-border-radius: 0;
    font-size: 14px;
    height: 25px;
    background-color: lightgray;
    outline: 0;
}
.papaya-slider-slice {
    padding: 0 5px;
    display: inline;
}
.papaya-slider-slice span {
    font-size: 14px;
    font-family: sans-serif;
    vertical-align: middle;
}
.papaya-slider-slice button {
    -webkit-appearance: none;
    border-radius: 0;
    -webkit-border-radius: 0;
    vertical-align: middle;
    font-size: 14px;
    height: 25px;
    background-color: lightgray;
}
.papaya-controlbar-label {
    color: #000;
}
.papaya-menu {
    width: 220px;
    background: #222;
    z-index: 100;
    position: absolute;
    border: solid 2px darkgray;
    padding: 4px;
    margin: 0;
}
.papaya-menu li {
    font-size: 12px;
    font-family: sans-serif;
    padding: 4px 2px;
    color: #b5cbd3;
    cursor: pointer;
    list-style-type: none;
}
.papaya-menu-label {
    font-size: 14px;
    font-family: sans-serif;
    font-weight: bold;
    padding: 2px 8px;
    cursor: pointer;
    vertical-align: text-bottom;
}
.papaya-menu-titlebar {
    font-size: 16px;
    font-family: sans-serif;
    padding: 3px 8px 0 8px;
    cursor: default;
    vertical-align: text-bottom;
    color: white;
}
.papaya-menu-icon {
    margin-left: 5px;
}
.papaya-menu-icon img {
    box-sizing: content-box;
}
.papaya-menu-hovering {
    background-color: #444;
}
.papaya-menu-spacer {
    height: 8px;
}
.papaya-menu-unselectable {
    -moz-user-select: -moz-none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    user-drag: none;
}
.papaya-menu-button-hovering {
    background-color: #DDD;
}
.papaya-menu-filechooser {
    cursor: pointer;
    width: 200px;
    display: inline-block;
    font-weight: normal;
}
.papaya-menu-input {
    width: 38px;
    margin-right: 5px;
    color: black;
}
li .papaya-menu-slider {
    vertical-align: middle;
    text-align: center;
    display: inline;
    width: 120px;
    padding: 0;
    margin: 0;
}
.papaya-dialog {
    min-width: 400px;
    max-width: 500px;
    height: 500px;
    background: #222;
    position: absolute;
    z-index: 100;
    border: solid 2px darkgray;
    padding: 6px;
    font-size: 14px;
    font-family: sans-serif;
    color: #b5cbd3;
    box-sizing: content-box;
    line-height: 1.45;
}
@media (max-width: 768px) {
    .papaya-dialog {
        min-width: 90%; /* Scale to 90% of the screen width */
        max-width: 90%;
        height: auto; /* Let the height adjust dynamically */
        padding: 10px; /* Adjust padding for smaller screens */
    }
}

@media (max-width: 480px) {
    .papaya-dialog {
        min-width: 90%;
        max-width: 90%;
        height: auto;
        padding: 5px;
        font-size: 12px; /* Reduce font size for tiny screens */
    }
}

.papaya-dialog-content {
    margin: 20px;
    height: 415px;
    color: #dedede;
    overflow: auto;
    -ms-overflow-style: -ms-autohiding-scrollbar;
}
.papaya-dialog-content-nowrap {
    white-space: nowrap;
}
.papaya-dialog-content table {
    margin: 0 auto;
}
.papaya-dialog-content-label {
    text-align: right;
    padding: 5px;
    color: #b5cbd3;
}
.papaya-dialog-content-control {
    text-align: left;
    padding: 5px;
}
.papaya-dialog-content-help {
    text-align: right;
    padding: 5px;
    color: lightgray;
    font-size: 12px;
}
.papaya-dialog-title {
    color: #b5cbd3;
    font-weight: bold;
    font-size: 16px;
}
.papaya-dialog-button {
    text-align: right;
    box-sizing: content-box;
    height: 22px;
}
.papaya-dialog-button button {
    box-sizing: content-box;
    color: black;
    font-size: 11px;
}
.papaya-dialog-background {
    position: fixed;
    top: 0;
    left: 0;
    background-color: #fff;
    width: 100%;
    height: 100%;
    opacity: .5;
}
.papaya-dialog-stopscroll {
    height: 100%;
    overflow: hidden;
}
.checkForJS {
    width: 90%;
    height: 90%;
    margin: 25px auto;
    background-color: black;
}
.checkForJS:before {
    position: relative;
    content: "Papaya requires JavaScript...";
    display: block;
    top: 45%;
    color: red;
    margin: 0 auto;
    font-size: 18px;
    font-family: sans-serif;
    text-align: center;
}
.papaya-utils-unsupported {
    width: 90%;
    height: 90%;
    margin: 25px auto;
    background-color: black;
}
.papaya-utils-unsupported-message {
    position: relative;
    display: block;
    top: 45%;
    color: red;
    margin: 0 auto;
    font-size: 18px;
    font-family: sans-serif;
    text-align: center;
}
.papaya-viewer {
    line-height: 1;
    font-family: sans-serif;
}
.papaya-viewer div, .papaya-viewer canvas {
    margin: 0;
    padding: 0;
    border: 0;
    font: inherit;
    font-size: 100%;
    vertical-align: baseline;
    font-family: sans-serif;
}
.papaya-viewer canvas {
    width: 100%; /* Add this line for dynamic width */
    height: 100%; /* Add this line for dynamic height */
    cursor: crosshair;
    box-sizing: border-box; /* Add this for consistent sizing */
}
/* iOS-specific fix for vertical mode */
@supports (-webkit-touch-callout: none) {
    html, body {
        height: 100%;
        overflow: hidden; /* Prevent scrolling issues */
    }

    .papaya {
        height: calc(100% - constant(safe-area-inset-bottom)); /* Handle safe area insets */
        height: calc(100% - env(safe-area-inset-bottom)); /* Fallback for modern browsers */
    }
}

