/* copy.nurigonul.com — FIX LAYOUT (safe overrides)
   Goal:
   - Do NOT fight the app’s JS-driven “flip cards”
   - Keep only one connection type visible at a time
   - Keep cards centered and sized consistently
   - Keep the Scan/Manually/Invite menu visible and aligned
*/

/* -----------------------------
   Global safety
------------------------------ */
html, body {
  height: 100%;
}

/* Prevent weird horizontal scroll from absolute-positioned cards */
body {
  overflow-x: hidden;
}

/* -----------------------------
   Connector: show/hide
   (matches original behavior)
------------------------------ */
div.component_Connector { display: none; }
div.component_Connector.show { display: block; }

/* Keep connector centered */
div.component_Connector.show {
  margin: 0 auto;
}

/* The JS flips .component_Connector by toggling .flip on the root.
   Keep the 3D container intact. */
div.component_Connector_inner{
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.5s;
  transform-style: preserve-3d;
}
div.component_Connector.flip div.component_Connector_inner{
  transform: rotateX(-180deg);
}

/* -----------------------------
   Cards
------------------------------ */
div.component_Connector_card_front,
div.component_Connector_card_back{
  position: absolute;
  top: 0;
  left: 50% !important;                /* override JS “left:-W/2px” */
  transform: translateX(-50%);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Back card is rotated by the flip */
div.component_Connector_card_back{
  transform: translateX(-50%) rotateX(180deg);
  margin-top: 15px;
}

/* Give the cards a consistent size so content doesn’t collapse */
div.component_Connector_card{
  width: 300px;
  height: 330px;
  border-radius: 14px;
  padding: 15px 12px 12px 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

/* Keep labels readable and not “stacked letter-by-letter” */
div.component_Connector_card_label,
div.component_Connector_card_sublabel{
  width: 100%;
  text-align: center;
  white-space: normal;
  word-break: normal;
}

/* QR container must be centered */
div.component_Connector_container{
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
}

/* QR image sizing */
div.component_Connector_container img,
div.component_Connector_connectiontypes_container canvas,
div.component_Connector_connectiontypes_container img{
  max-width: 190px;
  max-height: 190px;
  width: 190px;
  height: 190px;
}

/* IMPORTANT:
   The HTML contains ALL type panels, but the JS moves ONLY ONE into the card.
   Hide the original container so the “other” panels don’t show/overlap. */
div.component_Connector_connectiontypes_container{
  display: none !important;
}

/* -----------------------------
   Manual instructions (Manually tab)
------------------------------ */
div.component_Connector_instructions{
  width: 100%;
  margin-top: 10px;
}
div.component_Connector_instructions_url{
  font-weight: 900;
  overflow-wrap: anywhere;
}
div.component_Connector_instructions_guidance{
  margin: 14px 0;
  font-size: smaller;
}
div.component_Connector_instructions_code{
  font-size: x-large;
  font-weight: 900;
  letter-spacing: 2px;
}
div.component_Connector_instructions_validity{
  margin-top: 6px;
  font-size: smaller;
}

/* -----------------------------
   Invite panel (Invite tab)
------------------------------ */
div.component_Connector_sendinvite_container{
  width: 100%;
  margin-top: 12px;
  background: transparent;
}

div.component_Connector_sendinvite_channels{
  width: 170px;
  margin: 14px auto 0 auto;
}

div.component_Connector_sendinvite_channel_row{
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
div.component_Connector_sendinvite_channel{
  flex: 1 1 0;
}

/* -----------------------------
   Menu: Scan / Manually / Invite
------------------------------ */
div.component_MenuConnectionType{ display:none; margin-top: 15px; }
div.component_MenuConnectionType.show{ display:block; }

/* Make sure menu is centered and always visible */
div.component_MenuConnectionType_buttons{
  display: flex;
  justify-content: center;
  align-items: center;
  width: 215px;
  margin: 0 auto;
  border-radius: 9px;
  overflow: hidden;
}

div.component_MenuConnectionType_button{
  flex: 1 1 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 12px 10px 12px;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}

div.component_MenuConnectionType_button.selected{
  cursor: default;
}

/* Arrow container should not push content around */
div.component_MenuConnectionType_arrowcontainer{
  width: 14px;
  height: 14px;
  position: relative;
  margin: 0 auto 6px auto;
}

/* -----------------------------
   Manual connect panels (below connector)
------------------------------ */
div.component_ManualConnectInput,
div.component_ManualConnectHandshake{
  display: none;
}
div.component_ManualConnectInput.show,
div.component_ManualConnectHandshake.show{
  display: inline-block;
  margin-top: 12px;
}

/* -----------------------------
   Data input/output spacing (avoid overlap)
------------------------------ */
div.component_DataInput{
  display: none;
  width: 100%;
  max-width: 600px;
  margin: 18px auto 30px auto;
}
div.component_DataInput.show{ display: block; }

div.component_DataOutput{ display: none; }
div.component_DataOutput.show{ display: block; }

/* Keep sender/receiver layout stable */
div.sender_data{ display: flex; }
div.receiver_data_content{ display: flex; }

/* Optional: hide donate line if it’s floating weird */
div.component_SharedData_donate,
a.component_SharedData_donate{
  display: none !important;
}
