@font-face {
    font-family: 'SupplySans';
    font-weight: normal;
    font-style: normal;
    src: url('./assets/fonts/PPSupplySans-Regular.ttf') format('truetype');
}


/* ---------- layout & controls ---------- */
body {
    font-family: "SupplySans", monospace;
    margin: 0;
    background: #f5f5f5
}

* {
    font-family: "SupplySans", monospace;
    font-size: 12pt;
}


.ui-draggable-disabled .grid-stack-item button {
    width: 100%;
    height: 100%;
}

button {
    background-color: #c3c4c2;
    color: #fff;
    border: 0;
    font-size: 16pt;
    cursor: pointer;
    text-transform: uppercase;
    padding: 0 12px;

    &:hover {
        background-color: #111;
    }
}

.logo {
    width: 100%;
    height: 100%;
}

.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

.grid-container {
    flex-grow: 1;
    background: #fff;
    border-radius: 5px;
    padding: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
    overflow: auto;
    position: relative;
    width: 100%;
}

/* ---------- grid item shells ---------- */
.grid-stack-item-content {
    background: #f5f5f5;
    /* border: 2px solid #eaeaea; */
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    padding: 0;
    cursor: pointer;
    /* box-shadow: inset 0px 0px 0px 2px #eaeaea; */
}

/* ----------subgrid ---------- */
.grid-stack>.grid-stack-item.grid-stack-sub-grid>.grid-stack-item-content {
    background: #fbb040;
    inset: 0;
}

/* ---------- menu ---------- */
.grid-stack>.grid-stack-item.ui-draggable-disabled.grid-stack-sub-grid>.grid-stack-item-content {
    background: rgb(245 245 245);
}

.grid-stack.grid-stack-nested .grid-stack-item {
    /* background: blue; */
    transform: scale(0.95);
}

.grid-stack-item-content .default-img {
    width: 100%;
    height: calc(100% - 40px);
    object-fit: cover;
    object-position: top left;
    display: block;
}

.grid-stack-item-content:hover {
    /* background: rgba(0, 0, 0, 0.1); */
    box-shadow: inset 0px 0px 0px 2px rgba(0, 0, 0, 0.2);
}

.default-content {
    width: 100%;
    height: 100%;
}

.grid-stack-item-content:has(.item) {
    .item {
        height: 100% !important;
        margin: 0 !important;
    }

    .grab-header {
        opacity: 0;
    }

    audio.audio-player {
        opacity: 0;
    }
}

.grid-stack-item-content:has(.item):hover {
    .grab-header {
        opacity: 1;
    }


    audio.audio-player {
        opacity: 1;
    }
}

/* image */
.image-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.image-container:hover img {
    transition: filter 0.4s ease, transform 0.4s ease;
    filter: brightness(110%);
    transform: scale(1.02);
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

/* audio */
.audio-container {
    position: relative;
    width: 100%;
    height: 100%;

    audio.audio-player {
        width: calc(100% - 150px);
        height: 40px;
        border-radius: 0px;
        background-color: #f1f3f4;
        position: absolute;
        z-index: 2;
        margin-left: 100px;
        bottom: 0;
    }
}

.audio-img {
    height: 100% !important;
}


/* video */
.video-container {
    width: 100%;
    height: calc(100% - 42px);
    border: none;

    iframe {
        width: 100%;
        height: 100%;
    }
}

.video-img {
    padding-top: 40px;
}

.input-wrapper {
    width: calc(100% - 150px);
    height: 40px;
    border-radius: 0px;
    background-color: #f1f3f4;
    position: absolute;
    z-index: 2;
    margin-left: 110px;
    display: flex;
    top: 0;

    input {
        min-width: 20px;
        flex: 1;
        border: none;
        background: #f1f3f4;
    }
}

.video-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70px;
    height: 70px;
    transform: translate(-50%, -50%);
    opacity: .18;
    pointer-events: none;
    fill: #fff
}

.video-container:hover .drag-handle {
    opacity: 1;
    pointer-events: auto
}

.grab-header {
    width: 100%;
    background-color: #f1f3f4;
    height: 40px;
    display: flex;
    justify-content: space-between;
    cursor: grab;
    position: absolute;
    bottom: 0;
    z-index: 1;

    .icon {
        margin: 6px;
    }

    .arrow {
        margin: 8px;
        display: flex;
    }
}

/* 3-D model */
.model-container {
    position: relative;
    width: 100%;
    height: calc(100% - 40px);
    background: #ffffff;


    model-viewer {
        width: 100%;
        height: 100%;
    }
}


.model-container:hover .drag-handle {
    opacity: 1;
    pointer-events: auto
}

/* rich text */
.text-block {
    width: 100%;
    height: calc(100% - 40px);
    background-color: #caced4;
    margin-top: 40px;
    overflow: auto;

    .text {
        padding: 20px;
        height: calc(100% - 40px);
        width: calc(100% - 40px);
        background-color: #caced4;
        border: 0;
        border-radius: 0px;
        resize: none;
        font-size: 24px;
        color: #000;
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        min-height: fit-content;
    }
}

.link-container {
    background-color: #f7941d;
    height: calc(100% - 40px);
    width: 100%;
    display: flex;
    flex-direction: column;
    margin-top: 40px;

    .input-wrapper {
        width: calc(100% - 130px);
        margin-left: 90px;
        top: 0;
    }
}

.caption {
    background: transparent;
    border: none;
    padding: 20px;
    width: calc(100% - 30px);
    height: 100%;
    font-size: 14pt;
    display: flex;
    align-items: center;
    color: black;
}

/* delete button */
.delete-button {
    display: none;
    position: absolute;
    padding: 0;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(120, 120, 120, .7);
    color: #fff;
    border: 0;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    z-index: 14;
    opacity: .7;
    transition: opacity .2s
}

.grid-stack-item-content:hover .delete-button {
    display: flex
}

.grid-stack-item-content:hover .grid-stack.grid-stack-nested .delete-button {
    display: none;
}

.delete-button:hover {
    opacity: 1;
    background: rgba(100, 100, 100, .9)
}

.file-input {
    display: none
}

.grid-stack.manual-placement-mode .grid-stack-item {
    cursor: default
}

.item-btn {
    cursor: pointer;
    pointer-events: auto;
}

.page-link {
    display: inline-block;
    margin: 0 10px;
    text-decoration: none;
    color: #0077cc;
    font-weight: bold;
}

.page-link:hover {
    text-decoration: underline;
}

.page-title {
    font-size: 2rem;
}

.page-subtitle {
    font-size: 1.5rem;
}

.box-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.nav-box {
  width: 600px; /* fixed width for matching images */
  overflow: hidden;
}

.box-image {
  width: 100%;
  height: auto;
  display: block;
}