/* layout.css */

.center-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.outer-wrapper {
  width: 95vw;
  height: 95vh;
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.header-panel {
  padding: 1rem 2rem;
  background: rgba(0,0,0,0.25);
  font-weight: 700;
  font-size: 1.5rem;
}

.container {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.bot-panel {
  width: 35%;
  background: rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  
}

.viewer-panel {
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, rgba(13, 71, 161, 0.4), rgba(38, 198, 218, 0.4)); /* optional */
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow-y: auto;
  overflow: hidden;
}

/* Hide viewer-back on desktop */
@media (min-width: 769px) {
  .viewer-back {
    display: none !important;
  }
}

@media (max-width: 768px) {


.viewer-back {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 8px 14px;
  background: linear-gradient(to right, #FF5C35, #FF784E);
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  z-index: 25;
  transition: background 0.2s ease;
}

.viewer-back:hover {
  background: linear-gradient(to right, #FF784E, #FF5C35);
}


  
  .container {
    flex-direction: column;
    position: relative;
  }

.outer-wrapper {
    width:100%;
    height:100%;
    border-radius: 0;
}

  .bot-panel {
    width: 100%;
    height: 100vh;
    z-index: 1;
    transition: transform 0.3s ease-in-out;
  }

  .viewer-panel {
    position: absolute;
    top: 0;
    left: 100%;
    width: 100%;
    height: 97%;
    background: transparent;
    padding: 2rem 1rem;
    transition: transform 0.3s ease-in-out;
    z-index: 20;

    display: flex;               /* NEW – center the card */
    justify-content: center;
    align-items: center;
    overflow-y: auto;            /* NEW – scroll long answers */
  }
  



 .viewer-open .viewer-panel {      /* <-- listen to the class JS adds */
  transform: translateX(-100%);
}


  .viewer-card {
    width: 100%;
    height: 100%;
    max-width: 320px;
    max-height: calc(100% - 4rem);
    overflow-y: auto;
    margin-top: 2.5rem;
    padding: 1.5rem;
  }
  
  /* dark overlay behind drawer */
.viewer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
  z-index: 15;
}
/* orange pull-tab */
.viewer-handle {
  position: fixed; top: 45%; right: 0;
  width: 18px; height: 80px;
  border-radius: 8px 0 0 8px;
  background: #FF5C35;
  z-index: 14;
}
/* show overlay + enable clicks when drawer open */
.viewer-open .viewer-overlay {
    opacity: 1;
    pointer-events: auto; 
    
}
}






