html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body { 
    font-family: Arial, sans-serif; 
    margin: 0;
    padding: 0;
}

/* Layout styles */
.digsign-layout-container {
    display: flex;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.digsign-layout-main {
    flex: 6;
    overflow: visible;
    display: flex;
    justify-content: center;
    align-items: center;
}

.digsign-layout-sidebar {
    flex: 4;
    overflow: visible;
    padding: 0px;
}

.digsign-layout-header {
    width: 100%;
    background-color: #f8f8f8;
    padding: 0px;
    box-sizing: border-box;
    border-bottom: 0px solid #ddd;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

/* Fullscreen layout */
.digsign-layout-fullscreen .digsign-layout-main {
    flex: 1;
    width: 100vw;
}

.digsign-layout-fullscreen .digsign-layout-container {
    height: 100vh;
    width: 100vw;
}

.digsign-layout-fullscreen .gallery {
    width: 100vw;
    height: 100vh;
}

/* Header and 2 panels layout */
.digsign-layout-header-panels .digsign-layout-header {
    height: auto;
    min-height: 15vh;
    max-height: fit-content; /* Added to ensure header fits content */
}

.digsign-layout-header-panels .digsign-layout-container {
    height: calc(100vh - 15vh);
    min-height: 85vh;
}

/* 2 panels without header layout */
.digsign-layout-two-panels .digsign-layout-container {
    height: 100vh;
}

.main-content {
    margin: 0;
    padding: 0;
    height: 100%;
}

.gallery {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

.gallery .slide {
    max-width: 100%;
    max-height: 100%;
    border-radius: 0px;
    display: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

.gallery img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 100%;
}

.gallery .slide.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery .html-content {
    overflow: auto;
    background: #fff;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.gallery .html-content h2 {
    margin-top: 0;
}

.qrcode-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 100px;
    height: 100px;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 5px;
    border-radius: 5px;
    z-index: 10;
    display: none; /* Hidden by default, controlled by JS */
}

.qrcode-overlay img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Ensure header content is properly styled */
.digsign-layout-header p:first-child {
    margin-top: 0;
}

.digsign-layout-header p:last-child {
    margin-bottom: 0;
}

/* Style for right panel content */
.digsign-layout-sidebar p:first-child {
    margin-top: 0;
}
