
/* === Popup Overlay === */
.popup-overlay {
}

#popup-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    /* justify-content: center;
    align-items: center;  */
    /* margin: auto; */
    opacity: 0;
    z-index: 100;
    background: var(--popup-overlay-bg);
    pointer-events: none;
    transition: var(--transition-form);
}
#popup-overlay.mobile {
    /* margin: 0;
    padding: 0; */
    margin: 0;
    justify-content: flex-start;
    align-items: flex-start;
}
#popup-overlay.show {
    /* transform: translateX(0); */
    opacity: 1;
    pointer-events: auto;
}

#popup-overlay div {
    /* gap: 7px; */
}
#popup-titlebar {
    padding-left: 10px;
}

/* === Embedded iframe === */
.popup-content iframe {
    width: 100%;
    border: none;
    color: var(--input-color);
    background: var(--popup-bg);
    height: calc(100% - var(--title-height));
    
    min-height: var(--min-height-popup);
    display: flex;
    box-sizing: border-box;
    
}

#i-frame {
    opacity: 0;
    pointer-events: none;
    transition: opacity ease 1s;
}

#i-frame.show {
    opacity: 1;
    pointer-events: auto;
}

/* === Close Button === */
.popup-close {
    background: var(--input-bg);
    color: var(--input-color);
    border: none;
    /* border-radius: 50%; */
    width: var(--title-height);
    height: var(--title-height);
    cursor: pointer;
    font-size: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
#popup-content div {
    display: flex;
    justify-content:space-around;
    align-items: center;
    background: var(--bg-titlebar);
    /* padding: .5rem; */
}



.title-label {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    background: var(--bg-titlebar);
    color: var(--color-titlebar);
    width: 100%;
    height: var(--title-height);
    padding-left: 4px;
}




/* iframe fills content area */
#i-frame {
    display: flex;
  border: none;
  width: 100%;
}
#i-frame.mobile {
    max-width: 0;
}


#popup-content {
    position: absolute;
    display: flex;
    background: var(--popup-bg, #111);
    border-radius: 12px;
    position: relative;
    min-height: calc(var(--min-height-popup) + var(--title-height) + 1rem);
    /* min-width: 12rem; */
    /* min-height: var(--min-height-popup); */
    padding: 0;
}
#popup-content.mobile {
    /* position: absolute; */
    min-width: 0;
    /* min-width: 0; */
    min-height: 0;
    left: 0;
    top: 0;
    /* margin: auto; */
}

#popup-content {

    /* height: auto; */
}
/* === Popup Container === */
.popup-content {
    display: flex;
    flex-direction: column;
    color: var(--input-color);
}

/* resize grip bottom-right */
#popup-drag-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  cursor: se-resize;
  background: rgba(0, 0, 0, 0);
  border-top-left-radius: 12px;
  user-select: none;
  z-index: 20;
}
#popup-drag-handle::after {
  content: '';
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  border-right: 2px solid #888;
  border-bottom: 2px solid #888;
  opacity: 0.5;
  pointer-events: none;
}

#popup-icon  {
  width: auto;
  height: 24px;
  object-fit:cover;
}
