html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
    background-color: #f9fafb;
    font-family: 'Roboto', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: #374151;
}

a {
    color: #0d9488;
    text-decoration: none;
    transition: color 0.2s;
}

    a:hover {
        color: #0f766e;
    }

.yiu-navbar {
    background-color: #0d9488;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: none;
}

.yiu-dorpdown-toggle {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 2px 8px 6px 8px;
    align-content: center;
    transition: background-color 0.2s;
}

    .yiu-dorpdown-toggle:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

@media (min-width: 576px) {
    .navbar-scroll-container {
        width: calc(100% - 330px);
        overflow-x: auto;
        white-space: nowrap;
        cursor: grab;
        -ms-overflow-style: none;
        scrollbar-width: none;
        -webkit-mask-image: linear-gradient(to right, transparent 0, black 0, black 100%, transparent 100%);
        mask-image: linear-gradient(to right, transparent 0, black 0, black 100%, transparent 100%);
    }

        .navbar-scroll-container::-webkit-scrollbar {
            display: none;
        }

        .navbar-scroll-container:active {
            cursor: grabbing;
        }

        .navbar-scroll-container .navbar-nav {
            flex-direction: row;
            width: max-content;
        }

        .navbar-scroll-container .nav-item {
            margin-right: 15px;
        }
}

.yiu-navdropdown {
    background-color: #0d9488;
    margin-top: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-radius: 0.5rem;
    border: none;
}

.yiu-langdropdown {
    left: auto;
    right: -0.5rem;
    min-width: 6rem;
    text-align: center;
    background-color: #0d9488;
    margin-top: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-radius: 0.5rem;
    border: none;
}

.yiu-footer {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 16px 8px;
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    text-align: center;
    font-size: 0.875rem;
}

.center-content {
    text-align: center;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.display-row {
    display: table-row;
    padding: 10px;
    position: relative;
}

.input-title {
    text-align: right;
    margin: 0px 30px 1rem 0px;
    font-weight: 500;
}

.input-title-top {
    text-align: left;
    margin: 1rem 0px 7px 0px;
    font-weight: 500;
}

.input-alert {
    color: #ef4444;
    text-align: left;
    font-size: 0.875rem;
    margin-top: 4px;
}

.form-input, .number-input, .date-input, .time-input {
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    padding: 0.375rem 0.75rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

    .form-input:focus, .number-input:focus, .date-input:focus, .time-input:focus, .long-input:focus {
        outline: none;
        border-color: #0d9488;
        box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
    }

.form-input {
    width: 300px;
    height: 36px;
}

.number-input {
    width: 60px;
    height: 36px;
}

.date-input {
    width: 110px;
    height: 36px;
}

.time-input {
    width: 70px;
    height: 36px;
}

.long-input {
    width: 300px;
    height: 80px;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    padding: 0.375rem 0.75rem;
    resize: vertical;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.digit-input {
    width: 38px;
    height: 48px;
    font-size: x-large;
    text-align: center;
    border-radius: 0.375rem;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

    .digit-input:focus {
        outline: none;
        border-color: #0d9488;
        box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
    }

.info-popup {
    position: absolute;
    top: 36px;
    background-color: white;
    width: max-content;
    height: max-content;
    text-align: left;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 10;
}

.suggestion-option {
    position: relative;
    width: 100%;
    font-size: 0.875rem;
    text-align: left;
    background-color: white;
    border: 0px;
    border-bottom: 1px solid #f3f4f6;
    padding: 0.5rem 10px;
    cursor: pointer;
    transition: background-color 0.15s;
}

    .suggestion-option:hover {
        background-color: #f3f4f6;
    }

.page-button {
    min-width: max-content;
    height: 38px;
    background-color: #0d9488;
    background-image: none;
    color: white;
    border: none;
    border-radius: 0.375rem;
    padding: 0px 16px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s, transform 0.1s;
}

    .page-button:hover:not(:disabled) {
        background-color: #0f766e;
    }

    .page-button:active:not(:disabled) {
        transform: scale(0.98);
    }

    .page-button:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        background-color: #0d9488;
    }

.lock-button {
    min-width: max-content;
    height: 38px;
    background-color: #f59e0b;
    background-image: none;
    color: white;
    border: none;
    border-radius: 0.375rem;
    padding: 0px 16px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s;
}

    .lock-button:hover {
        background-color: #d97706;
    }

.delete-button {
    min-width: max-content;
    height: 38px;
    background-color: #ffffff;
    background-image: none;
    color: #ef4444;
    border: 1px solid #f87171;
    border-radius: 0.375rem;
    padding: 0px 16px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s;
}

    .delete-button:hover {
        background-color: #fef2f2;
    }

.delete-icon {
    height: 36px;
    width: 36px;
    background-color: #ef4444;
    background-image: none;
    color: white;
    border: none;
    border-radius: 0.375rem;
    text-align: center;
    align-content: center;
    cursor: pointer;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s;
}

    .delete-icon:hover {
        background-color: #dc2626;
    }

.addtag-button {
    height: 28px;
    width: 28px;
    background-color: #0d9488;
    background-image: none;
    color: white;
    border: none;
    border-radius: 0.25rem;
    margin-bottom: 2px;
    margin-right: 2px;
    text-align: center;
    align-content: center;
    cursor: pointer;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s;
}

    .addtag-button:hover {
        background-color: #0f766e;
    }

.payment-button {
    height: 240px;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    cursor: pointer;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: border-color 0.2s, box-shadow 0.2s;
}

    .payment-button:hover {
        border-color: #0d9488;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }

.hub-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.hub-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    aspect-ratio: 1 / 1 !important;
    width: 80%;
    height: 120px;
    margin: 0px 10%;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-decoration: none !important;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s;
}

    .hub-btn:hover {
        border-color: #0d9488;
        box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    }

    .hub-btn:active {
        transform: scale(0.98);
        box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }

    .hub-btn img {
        width: 40px;
        height: 40px;
        margin: 5px 0px;
        object-fit: contain;
    }

    .hub-btn span {
        font-size: 0.875rem;
        font-weight: 600;
        text-align: center;
        line-height: 1.25rem;
        color: #0d9488;
        padding: 0 10px;
    }

.info-button {
    width: 42px;
    height: 42px;
    background-color: transparent;
    color: #0d9488;
    font-size: 1.25rem;
    border: 0;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s;
}

    .info-button:hover {
        background-color: #f0fdfa;
    }

.hollow-button {
    height: 32px;
    background-color: #ffffff;
    color: #0d9488;
    border: 1px solid #0d9488;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0 12px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

    .hollow-button:hover {
        background-color: #f0fdfa;
    }

.category-button {
    height: 32px;
    background-color: #ffffff;
    color: #0d9488;
    border: 1px solid #0d9488;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

    .category-button:hover {
        background-color: #f0fdfa;
    }

.category-button-selected {
    height: 32px;
    border: 1px solid #0d9488;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #ffffff;
    background-color: #0d9488;
    padding: 0 16px;
    text-align: center;
    cursor: pointer;
}

.record-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #0d9488;
}

/* Modernized Grid Borders */
.record-top-left, .record-top, .record-top-right,
.record-right, .record-bottom-right, .record-bottom,
.record-bottom-left, .record-left, .record-whole-left,
.record-whole-top, .record-whole-mid, .record-whole-mid2,
.record-whole-bottom, .record-whole-right {
    align-content: center;
    border: solid #e5e7eb;
}

.record-top-left {
    border-width: 1px 0 0 1px;
    border-radius: 0.5rem 0 0 0;
    padding-left: 12px;
}

.record-top {
    border-width: 1px 0 0 0;
}

.record-top-right {
    border-width: 1px 1px 0 0;
    border-radius: 0 0.5rem 0 0;
    padding-left: 12px;
}

.record-right {
    border-width: 0 1px 0 0;
}

.record-bottom-right {
    border-width: 0 1px 1px 0;
    border-radius: 0 0 0.5rem 0;
    padding-left: 12px;
}

.record-bottom {
    border-width: 0 0 1px 0;
}

.record-bottom-left {
    border-width: 0 0 1px 1px;
    border-radius: 0 0 0 0.5rem;
    padding-left: 12px;
}

.record-left {
    border-width: 0 0 0 1px;
}

.record-whole-left {
    border-width: 1px 0 1px 1px;
    border-radius: 0.5rem 0 0 0.5rem;
    padding-left: 12px;
}

.record-whole-top {
    border-width: 1px 1px 0 1px;
    border-radius: 0.5rem 0.5rem 0 0;
    padding-left: 12px;
}

.record-whole-mid {
    border-width: 1px 0 1px 0;
}

.record-whole-mid2 {
    border-width: 0 1px 0 1px;
}

.record-whole-bottom {
    border-width: 0 1px 1px 1px;
    border-radius: 0 0 0.5rem 0.5rem;
    padding-left: 12px;
}

.record-whole-right {
    border-width: 1px 1px 1px 0;
    border-radius: 0 0.5rem 0.5rem 0;
    padding-right: 12px;
}

.record-whole {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    margin-bottom: 8px;
}

.color-tile {
    border: 2px solid white;
    width: 36px;
    height: 36px;
    border-radius: 0.25rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.layout-region {
    position: absolute;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.layout-border-top, .layout-border-left, .layout-corner-top-left, .layout-corner-top-right {
    position: absolute;
    background-color: white;
}

.layout-border-top {
    cursor: ns-resize;
}

.layout-border-left {
    cursor: ew-resize;
}

.layout-corner-top-left {
    cursor: nwse-resize;
}

.layout-corner-top-right {
    cursor: nesw-resize;
}

.text-region-preview {
    position: relative;
    width: 100%;
    height: 100%;
    text-wrap: nowrap;
    overflow: hidden;
}

.media-region-preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.scroll-panel {
    position: absolute;
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    width: 400px;
    height: 260px;
    overflow-y: scroll;
}

.canvas-container {
    display: inline-block;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: #ffffff;
}

.record-hover, .drop-container-hover {
    background-color: #f0fdfa;
}

.popup-container {
}

    .popup-container .popup-background {
        z-index: 1000;
        visibility: hidden;
        position: fixed !important; /* Force lock to the viewport */
        left: 0 !important;
        top: 0 !important;
        width: 100vw !important; /* Ensure full viewport width */
        height: 100vh !important; /* Ensure full viewport height */
        background-color: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(2px);
        overflow-y: auto !important;
        display: block;
    }

    .popup-container .show {
        visibility: visible;
        -webkit-animation: fadeIn 0.3s;
        animation: fadeIn 0.3s
    }

.popup-window {
    position: relative !important;
    top: 0 !important; /* Blocks JS from pushing it down the page */
    left: 0 !important;
    transform: none !important;
    margin: 5vh auto !important; /* Locks it to 5% from the top of the screen */
    padding: 24px;
    border-radius: 0.75rem;
    color: #1f2937;
    background-color: #ffffff;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 90vw; /* Prevent wide popups from causing horizontal scrolling */
}

@media only screen and (max-width: 768px) {
    .popup-window {
        width: 92% !important;
        max-width: 92vw !important;
        min-width: 0px !important;
        left: 0 !important;
        right: 0 !important;
        margin: 5vh auto !important; /* Update this margin rule */
        box-sizing: border-box;
    }

        .popup-window .page-button {
            white-space: normal;
            height: auto;
            padding: 8px 12px;
        }
}

.slidecontainer {
    width: 200px;
    height: 24px;
}

.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 4px;
    background: #e5e7eb;
    outline: none;
    transition: background-color .2s;
}

    .slider:hover {
        background: #d1d5db;
    }

    .slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: #0d9488;
        cursor: pointer;
        box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }

    .slider::-moz-range-thumb {
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: #0d9488;
        cursor: pointer;
        box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }

@-webkit-keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

input::-webkit-calendar-picker-indicator {
    display: none !important;
}

.prevent-select {
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.yiu-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

    .yiu-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.yiu-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: .3s;
    border-radius: 24px;
}

    .yiu-switch-slider:before {
        position: absolute;
        content: "";
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: .3s;
        border-radius: 50%;
        box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }

input:checked + .yiu-switch-slider {
    background-color: #0d9488;
}

    input:checked + .yiu-switch-slider:before {
        transform: translateX(26px);
    }

.bootstrap-select {
    top: -2px;
    border-radius: 0.375rem;
}

    .bootstrap-select .dropdown-toggle {
        height: 36px;
        border: 1px solid #d1d5db;
        border-radius: 0.375rem;
        padding: 4px 10px;
        background-color: white;
        box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
    }

    .bootstrap-select > .disabled {
        background-color: #f9fafb;
        border: 1px solid #e5e7eb;
    }

.record-pressing {
    position: relative;
    overflow: hidden;
}

    .record-pressing::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 0;
        background-color: rgba(13, 148, 136, 0.15);
        animation: longPressFill 0.5s linear forwards;
        pointer-events: none;
    }

@keyframes longPressFill {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

.alert-counter {
    position: absolute;
    top: 14px;
    left: 20px;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    border: 2px solid white;
    background-color: #ef4444;
    color: white;
    font-size: x-small;
    text-align: center;
    font-weight: bold;
}

.apple-pay-button {
    --apple-pay-button-width: 240px;
    --apple-pay-button-height: 40px;
    --apple-pay-button-border-radius: 8px;
}

.chatbot-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    background-color: #0d9488;
    color: white;
    border: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s, transform 0.1s;
}

    .chatbot-toggle-btn:hover {
        background-color: #0f766e;
    }

    .chatbot-toggle-btn:active {
        transform: scale(0.95);
    }

.chatbot-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    z-index: 9999;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-header {
    background-color: #0d9488;
    color: white;
    padding: 12px 16px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .chatbot-header button {
        background: none;
        border: none;
        color: white;
        cursor: pointer;
        font-size: 24px;
        line-height: 1;
        transition: color 0.2s;
    }

        .chatbot-header button:hover {
            color: #e5e7eb;
        }

.chatbot-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: #f9fafb;
}

.chatbot-message {
    padding: 10px 14px;
    border-radius: 0.5rem;
    max-width: 85%;
    font-size: 0.875rem;
    line-height: 1.4;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

    .chatbot-message.bot {
        align-self: flex-start;
        background-color: #ffffff;
        color: #374151;
        border: 1px solid #e5e7eb;
    }

    .chatbot-message.user {
        align-self: flex-end;
        background-color: #0d9488;
        color: white;
    }

.chatbot-input-area {
    padding: 12px;
    background-color: #ffffff;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 8px;
}

    .chatbot-input-area .form-input {
        flex: 1;
        width: auto;
    }

#global-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(2px);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

.web-spinner {
    border: 4px solid #e5e7eb;
    border-top: 4px solid #0d9488;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
