@import url('https://fonts.cdnfonts.com/css/fake-receipt');
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap');

#pullToRefresh {
    position: fixed;
    top: -50px;
    left: 0;
    width: 100%;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease-out;
    z-index: 9999;
}

#inviteTable, #staffTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
    table-layout: fixed;
}

#inviteTable a, #staffTable a {
    color: black;
    text-decoration: none;
}

#inviteTable th, #staffTable th {
    text-align: left;
    padding-bottom: 6px;
    font-weight: bold;
}

#inviteTable td, #staffTable td {
    padding: 6px 0;
    height: 29px;
}

#inviteTable td, #staffTable td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#inviteTable th,
#inviteTable td, #staffTable th, #staffTable td {
    text-align: left;
    vertical-align: middle;
}

#inviteTable tr, #staffTable tr {
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

#inviteTable th:nth-child(1),
#inviteTable td:nth-child(1) {
    width: 20%; /* Guest */
    padding-right: 10px;
}

#inviteTable th:nth-child(2),
#inviteTable td:nth-child(2) {
    width: 20%; /* Email */
    padding-right: 10px;
}

#inviteTable th:nth-child(3),
#inviteTable td:nth-child(3) {
    width: 15%; /* Status */
}

#inviteTable th:nth-child(4),
#inviteTable td:nth-child(4) {
    width: 8%; /* Code */
}

#inviteTable th:nth-child(5),
#inviteTable td:nth-child(5) {
    width: 10%; /* Button */
    text-align: right;
}

#managementBtn {
    font-size: 12px;
    width: 300px;
    border: white;
    color: black;
    background-color: transparent;
    cursor: pointer;
    font-family: 'Fake Receipt', sans-serif;
    margin: 0 auto 20px auto;
    /* Center horizontally with top/bottom margin */
    padding: 5px 0px;
    display: block;
    /* Make the button take up its own line */
}

#managementBtn:hover {
    background-color: #f3f3f3;
}

#indexSection {
    position: absolute;
    width: 500px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

#confirmSection {
    position: absolute;
    width: 500px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

#confirmSection img {
    display: flex;
    image-rendering: pixelated;
    width: 250px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0px;
    margin-bottom: 0px;
}

#confirmSection p {
    font-size: 12px;
}

.qrText {
    font-size: 11px !important;
}

#confirmSection h1 {
    font-size: 22px;
}

.spinner {
    width: 10px;
    height: 10px;
    border: 3px solid black;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.5s linear infinite;
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

#pullToRefresh.ready .spinner {
    opacity: 1;
}

#pullToRefresh.loading {
    transform: translateY(50px);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

meta[name="theme-color"] {
    transition: 0.5s ease;
}

textarea {
    resize: vertical;
}

select {
    cursor: pointer;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

.content-wrapper {
    min-height: 100vh;
    overflow: hidden;
}

body {
    transition: 0.5s ease;
}

.column {
    float: left;
    width: 10%;
}

/* Clear floats after image containers */
.row::after {
    content: "";
    clear: both;
    display: table;
}


/* Main content styles */
.main-content {
    padding: 40px;
    transition: transform 0.5s ease-in-out;
    /* Transition for sliding down effect */
    max-width: 1200px;
    /* Maximum width for larger screens */
    width: 100%;
    /* Ensure the content stretches to fit smaller screens */
    padding-top: 54px;
}

.content-wrapper {
    transition: transform 0.5s ease;
    /* Transition for sliding down effect */
    display: flex;
    width: 100%;
    margin: 0 auto;
    /* Center the content wrapper */
    justify-content: center;
    /* Ensure the content is centered */
}

body {
    font-family: 'Fake Receipt', sans-serif;
    background-color: white;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    height: 100vh;
    overflow-y: auto;
    /* Allows scrolling if content overflows */
}

form {
    margin-bottom: 20px;
}

form button {
    font-size: 12px;
    width: 100%;
    border: white;
    color: black;
    background-color: transparent;
    cursor: pointer;
    font-family: 'Fake Receipt', sans-serif;
    margin: 0 auto 20px auto;
    /* Center horizontally with top/bottom margin */
    padding: 5px 0px;
    display: block;
    /* Make the button take up its own line */
}

form button:hover {
    background-color: #f3f3f3;
}

form input {
    font-size: 12px;
    width: 100%;
    margin-bottom: 2px;
    border: white;
    font-family: 'Fake Receipt', sans-serif;
    background-color: transparent;
}

h1 {
    margin-bottom: 2px;
    margin-top: 3px;
    font-family: "IBM Plex Mono", monospace;
}

/* Remove button styles */
.remove-button {
    position: absolute;
    top: 4px;
    right: 5px;
    background-color: transparent;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.3s;
    mix-blend-mode: difference;
    height: 23px;
}


.access-denied, #confirmedMessage {
    font-size: 10px;
    margin: 0;
    display: flex;
    /* Enables Flexbox layout */
    justify-content: center;
    /* Centers content horizontally */
    align-items: center;
    /* Centers content vertically */
    text-align: justify;
    /* Justifies text */
    text-justify: inter-word;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#loginForm {
    width: 250px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
}

#loginForm input {
    font-family: "IBM Plex Mono", monospace;
    font-weight: 500;
    font-style: normal;
}

#loginError {
    font-size: 10px;
    margin-bottom: 30px;
    display: flex;
    /* Enables Flexbox layout */
    justify-content: center;
    /* Centers content horizontally */
    align-items: center;
    /* Centers content vertically */
    text-align: justify;
    /* Justifies text */
    text-justify: inter-word;
}

#registerForm {
    width: 250px;
    margin-left: auto;
    margin-right: auto;
    font-size: 10px;
    margin-bottom: 25px;
}

#registerForm input {
    font-family: "IBM Plex Mono", monospace;
    font-weight: 500;
    font-style: normal;
}

#registerForm button {
    margin-bottom: 0;
}

#registerFeedback {
    font-size: 10px;
    display: flex;
    /* Enables Flexbox layout */
    justify-content: center;
    /* Centers content horizontally */
    align-items: center;
    /* Centers content vertically */
    text-align: justify;
    /* Justifies text */
    text-justify: inter-word;
    margin-top: 25px;
}

#genForm {
    width: 250px;
    margin-left: auto;
    margin-right: auto;
    font-size: 10px;
    margin-bottom: 25px;
}

#genForm input {
    font-family: "IBM Plex Mono", monospace;
    font-weight: 500;
    font-style: normal;
}

#genForm button {
    margin-bottom: 0;
}

#generatedHash {
    font-size: 7px;
    display: flex;
    /* Enables Flexbox layout */
    justify-content: center;
    /* Centers content horizontally */
    align-items: center;
    /* Centers content vertically */
    text-align: justify;
    /* Justifies text */
    text-justify: inter-word;
    margin-top: 10px;
    font-family: "IBM Plex Mono", monospace;
}

#inviteForm {
    width: 250px;
    margin-left: auto;
    margin-right: auto;
    font-size: 10px;
    margin-bottom: 25px;
}

#inviteLink {
    font-size: 10px;
    display: flex;
    /* Enables Flexbox layout */
    justify-content: center;
    /* Centers content horizontally */
    align-items: center;
    /* Centers content vertically */
    text-align: justify;
    /* Justifies text */
    text-justify: inter-word;
    margin-top: 10px;
    font-family: "IBM Plex Mono", monospace;
}

#inviteLink a {
    text-decoration: none;
    color: black;
}

#sectionTitle, .sectionTitle {
    text-align: center;
    font-size: 14px;
    margin-top: 20px;
}

#adminSection {
    width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 50px;
}

#staffSection {
    width: 700px;
    margin-left: auto;
    margin-right: auto;
}

#staffTable th:nth-child(3),
#staffTable td:nth-child(3) {
    width: 10%;
}

#staffControls input {
    font-family: "IBM Plex Mono", monospace;
    font-weight: 500;
    font-style: normal;
    font-size: 12px;
    border: transparent;
    background-color: transparent;
}

#staffControls {
    width: 100%;
}

.floatStaffRight {
    float: right;
}

#staffPermission {
    font-family: "IBM Plex Mono", monospace;
    font-weight: 500;
    font-style: normal;
    font-size: 12px;
    border: transparent;
    background-color: transparent;
    color: black;
}

#createStaff {
    border: 1px solid black;
    color: black;
    background-color: transparent;
    font-size: 10px;
    cursor: pointer;
    font-family: 'Fake Receipt', sans-serif;
    padding: 5px 10px;
    font-weight: 900;
    transition: 0.2s ease;
}

#createStaff:hover {
    border: 1px solid black;
    color: white;
    background-color: black;
}

#logoutBtn {
    border: 1px solid black;
    color: black;
    background-color: transparent;
    font-size: 10px;
    cursor: pointer;
    font-family: 'Fake Receipt', sans-serif;
    padding: 5px 10px;
    font-weight: 900;
    transition: 0.2s ease;
    float: right;
}

#logoutBtn:hover {
    border: 1px solid black;
    color: white;
    background-color: black;
}

#scanResult {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    margin: 0;
    text-align: center;
}

#statusText {
    font-family: 'Fake Receipt', sans-serif;
    font-size: 16px;
}

#guestName {
    font-size: 22px;
    font-family: "IBM Plex Mono", monospace;
    font-weight: bold;
}

#staff {
    font-size: 11px;
}

#errorMessage,
#successMessage {
    font-size: 10px;
    margin-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: justify;
    text-justify: inter-word;
}

#listContainer {
    display: flex;
    gap: 20px;
    /* Spacing between elements */
    padding: 0px;
    justify-items: center;
    /* Center items horizontally */
    margin-top: 25px;
}

.center-con {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 120px;
    filter: invert();
    border: 0px solid transparent !important;
}

.round {
    position: absolute;
    border: 0px;
    width: 40px;
    height: 40px;
    border-radius: 100%;

}

#cta {
    width: 100%;
    cursor: pointer;
    position: absolute;
}

#cta .arrow {
    left: 18%;
}

.arrow {
    position: absolute;
    bottom: 0;
    margin-left: 0px;
    width: 16px;
    height: 16px;
    background-size: contain;
    top: 12px;
}

.secondary {
    margin-left: 8px;
}

.next {
    background-image: url(data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgNTEyIDUxMiI+PHN0eWxlPi5zdDB7ZmlsbDojZmZmfTwvc3R5bGU+PHBhdGggY2xhc3M9InN0MCIgZD0iTTMzMiAyNTZMIDIxMiAxMzZjLTYtNi02LTE2IDAtMjJsMjAtMjBjNi02IDE2LTYgMjIgMGwxNDAgMTQwYzYgNiA2IDE2IDAgMjJsLTE0MCAxNDBjLTYgNi0xNiA2LTIyIDBsLTIwLTIwYy02LTYtNi0xNiAwLTIybDEyMC0xMjB6Ii8+PC9zdmc+);
}

@keyframes bounceAlpha {
    0% {
        opacity: 1;
        transform: translateX(0px) scale(1);
    }

    25% {
        opacity: 0;
        transform: translateX(10px) scale(0.9);
    }

    26% {
        opacity: 0;
        transform: translateX(-10px) scale(0.9);
    }

    55% {
        opacity: 1;
        transform: translateX(0px) scale(1);
    }
}

.bounceAlpha {
    animation-name: bounceAlpha;
    animation-duration: 1.4s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

.arrow.primary.bounceAlpha {
    animation-name: bounceAlpha;
    animation-duration: 1.4s;
    animation-delay: 0.2s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

.round .arrow

/*:hover*/
    {
    animation-name: bounceAlpha;
    animation-duration: 1.4s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

.round .arrow.primary

/*:hover*/
    {
    animation-name: bounceAlpha;
    animation-duration: 1.4s;
    animation-delay: 0.2s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

.inviteForm {
    opacity: 0;
    visibility: hidden !important;
    /* Hide the element after fade out */
    transition: opacity 0.6s ease-in-out, visibility 0s 0.6s;
    /* Fade out */
}

.inviteForm.hide {
    opacity: 0;
    visibility: hidden !important;
    /* Hide the element after fade out */
    transition: opacity 0.6s ease-in-out, visibility 0s 0.6s;
    /* Fade out */
}

.inviteForm.show {
    opacity: 1;
    visibility: visible !important;
    /* Ensure the element is visible */
    transition: opacity 0.6s ease-in-out;
    /* Fade in */
}

#inviteText {
    cursor: pointer;
}

.inviteText {
    opacity: 1;
    visibility: visible !important;
    /* Ensure the element is visible */
    transition: opacity 0.6s ease-in-out;
    /* Fade in */
    height: 88px;
}

.inviteText.hide {
    opacity: 0;
    visibility: hidden !important;
    /* Hide the element after fade out */
    transition: opacity 0.6s ease-in-out, visibility 0s 0.6s;
    /* Fade out */
}

.inviteText.show {
    opacity: 1;
    visibility: visible !important;
    /* Ensure the element is visible */
    transition: opacity 0.6s ease-in-out;
    /* Fade in */
}

.inviteWrapper {
    position: relative;
    text-align: center;
    height: 100vh;
    /* Full viewport height to ensure proper centering */
}

.inviteText,
.inviteForm {
    position: absolute;
    /* This makes the elements overlap */
    top: 50%;
    /* Centers the elements vertically */
    left: 50%;
    /* Centers the elements horizontally */
    transform: translate(-50%, -50%);
    /* Adjusts for the element's own dimensions */
    width: 300px;
    /* Ensures both sections have the same width */
    margin: 0;
}

.inviteBody {
    overflow: hidden;
    height: 100%;
}

.inviteWrapper h3 {
    font-size: 9px;
    margin-bottom: 5px;
    font-weight: bold;
}

.inviteWrapper h1 {
    font-size: 20px;
    margin-top: 0px;
    margin-bottom: 0px;
}

.center-con-invite {
    display: flex;
    align-items: center;
    justify-content: center;
    filter: invert();
    margin-top: 20px;
    border: 0px solid transparent !important;
}

.content-invite {
    height: 100%;
    /* Ensure the page takes up full height */
    margin: 0;
    display: flex;
    align-items: center;
    /* Vertically center the content */
    justify-content: center;
    /* Horizontally center the content */
}

#generateInvite {
    font-size: 11px;
    width: 250px;
    border: white;
    color: black;
    background-color: transparent;
    cursor: pointer;
    font-family: 'Fake Receipt', sans-serif;
    margin-bottom: 6px;
    padding: 5px 0px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    text-align: center;
    align-items: center;
    justify-content: center;
}

#generateInvite:hover {
    background-color: #f3f3f3;
}

#adminName {
    margin-top: 0;
    font-size: 10px;
}

#adminName a {
    text-decoration: none;
    color: black;
    font-weight: bold;
}

.inviteId {
    font-size: 10px;
    margin-bottom: 3px;
    margin-top: 0px;
}

.inviteId a {
    text-decoration: none;
    color: black;
}

.inviteStatus {
    font-size: 10px;
    margin-top: 0px;
    margin-bottom: 0px;
}

.inviteGuest {
    font-size: 10px;
    margin-top: 0px;
    margin-bottom: 3px;
}

.inviteCreatedAt {
    font-size: 7.5px;
    color: grey;
    margin-top: 8px;
}

.inviteContainer {
    display: flex;
    flex-direction: column;
    align-items: left;
    text-align: left;
    padding: 0px;
    width: 100%;
    /* Ensures user containers take up full width */
    margin-top: 20px;
}

.deleteInviteButton,
.shareInviteButton, .deleteUserButton {
    border: 1px solid black;
    color: black;
    background-color: transparent;
    font-size: 10px;
    cursor: pointer;
    font-family: 'Fake Receipt', sans-serif;
    padding: 5px 10px;
    font-weight: 900;
    transition: 0.2s ease;
    width: 28px;
    height: 28px;
}

.deleteInviteButton:hover, .shareInviteButton:hover, .deleteUserButton:hover {
    border: 1px solid black;
    color: white;
    background-color: black;
}

.deleteUserButton {
    float: right;
}

.shareInviteButton {
    margin-right: 7px;
}

.progress {
    position: relative;
    width: 250px;
    margin: 40px auto 0;
    height: 60px;
}

.progress::before {
    content: "";
    position: absolute;
    top: 14px;
    left: 0;
    width: 100%;
    height: 4px;
    background: #ccc;
}

.progress-bar {
    position: absolute;
    top: 14px;
    left: 0;
    height: 4px;
    width: 0%;
    background: #000000;
    transition: width 0.4s ease;
}

/* Wrapper positions */
.step-wrapper {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    text-align: center;
}

/* Position each step */
.step-wrapper[data-step="confirmed"] { left: 0%; }
.step-wrapper[data-step="present"]   { left: 50%; }
.step-wrapper[data-step="fulfilled"] { left: 100%; }

/* Dot */
.step {
    width: 12px;
    height: 12px;
    background: #ccc;
    margin: 0 auto;
    position: relative;
    top: 10px;
    z-index: 2;
}

/* Label */
.step-wrapper span {
    display: block;
    margin-top: 15px;
    font-size: 11px;
    color: #666;
}

/* Active */
.step.active {
    background: #000000;
}

@media (max-width: 768px) {

    body {
        overflow-x: hidden;
    }

    .center-con {
        transform: rotate(0deg);
        margin-top: 200px !important;
    }

    #adminSection {
        width: 100% !important;
    }

    #staffSection {
        width: 100% !important;
    }

    #staffControls {
        margin-top: 20px;
        display: flex;
        flex-direction: column;   /* stack vertically */
        align-items: center;      /* center horizontally */
        gap: 10px;                 /* spacing between items */
        width: 100%;
    }

    #staffControls input,
    #staffPermission,
    #createStaff {
        width: 250px;             /* consistent width */
        text-align: left;
    }

    .floatStaffRight {
        display: flex;
        flex-direction: column;   /* stack dropdown + button */
        align-items: center;
        gap: 10px;
        width: 100%;
    }

    #createStaff {
        font-size: 11px;
        width: 250px;
        border: white;
        color: black;
        background-color: transparent;
        cursor: pointer;
        font-family: 'Fake Receipt', sans-serif;
        margin-bottom: 6px;
        padding: 5px 0px;
        margin-left: auto;
        margin-right: auto;
        display: flex;
        text-align: center;
        align-items: center;
        justify-content: center;
        font-weight: 500;
    }

    #createStaff:hover {
        background-color: #f3f3f3;
    }

    #inviteTable th:nth-child(1),
    #inviteTable td:nth-child(1) {
        width: 18%; /* Guest */
    }

    body.is-admin #inviteTable th:nth-child(2),
    body.is-admin #inviteTable td:nth-child(2) {
        display: none; /* Email */
    }

    #inviteTable th:nth-child(3),
    #inviteTable td:nth-child(3) {
        display: none; /* Code */
    }

    #inviteTable th:nth-child(4),
    #inviteTable td:nth-child(4) {
        width: 12%; /* Status */
    }

    #inviteTable th:nth-child(5),
    #inviteTable td:nth-child(5) {
        width: 10%; /* Button */
        text-align: right;
    }

}