dialog.msgbox 
{
  background: white;
  padding: 0px;
  min-width: 400px;
  max-width: min(800px, 80vw);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  font-family: sans-serif;
  transition: all 0.3s ease;
  flex-direction: column;
  gap: 5px;
  box-sizing: border-box;
  border: 2px solid black;
  
}
@media screen and (max-width: 500px)
{
    dialog.msgbox 
    {
        min-width: unset;
        max-width: 95vw;
        width: 95vw;
        height: 95vh;
        max-height: 95vh;
        
    }
}


dialog.msgbox[open]
{
    display: flex;
    flex-direction: column;
}
.msgbox[data-color="red"]
{
    background: #ffd6cc;
}
.msgbox[data-visible="0"]
{
    
}
dialog::backdrop 
{
  background: rgba(0,0,0,0.5);
  
}

.msgbox-header 
{
    background: #a9c308;
    flex: 1;
    flex-grow: 0;
    display: flex;
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 15px;
    padding: 5px 10px;
}

.msgbox-icon 
{
    flex: 1;
    flex-grow: 0;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    
}
.msgbox-icon  img
{
    width: 40px;
    height: 40px;
}

.msgbox-title 
{
    color: black;
    flex: 1;
    flex-grow: 1;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    
    font-weight: bold;
    
}

.msgbox-text 
{
    flex: 1;
    padding: 10px;
    overflow: hidden;
    overflow-y: hidden;
    overflow-y: auto;
}

.msgbox-buttons
{
    background: whitesmoke;
    padding: 1vw 1.5vh;
    margin-top: 25px;
    display: flex;
    flex: 1;
    flex-grow: 0;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    padding: 10px;
    gap: 1vw;
}
.msgbox-buttons > button
{
    flex-basis: auto;
    max-width: 15vw;
    min-width: 100px;
}
.msgbox-buttons > button[data-enabled="0"]
{
    pointer-events: none;
    filter: grayscale(100%);
    opacity: 0.6;
    color: dimgray;
}

@media screen and (max-height: 500px), screen and (max-width: 500px)
{
    .msgbox-buttons > button
    {
        max-width: unset;
        flex-basis: auto;
    }
    dialog.msgbox 
    {
        height: 100%;
        width: 100%;
        max-width: unset;
        min-width: unset;
        max-height: unset;
        border-radius: 0px;
    }
    .msgbox-buttons
    {
        margin-top: 1vh;
        padding: 0.5vw 1vh;
    }
    .msgbox-header
    {
        padding: 1px 5px;
    }
    .msgbox-icon img
    {
        width: 20px;
        height: 20px;
    }
    .msgbox-title
    {
        font-size: 90%;
    }
}

