/* --- Template Styles --- */
@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:600&display=swap');


/* hide mobile toolbar on all screens */
#mobile-toolbar {
  display: none;
}

/* Button Styling */
button,
[role="button"] {
  -webkit-appearance: none;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  cursor: pointer;
  width: 150px;
  height: 50px;
  background-image: linear-gradient(to top, #D8D9DB 0%, #fff 80%, #FDFDFD 100%);
  border-radius: 30px;
  border: 1px solid #8F9092;
  box-shadow: inset 0 0 3px 0 #CECFD1;
  transition: all 0.2s ease;
  font-family: "Source Sans Pro", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #606060;
  text-shadow: 0 1px #fff;
  position: relative;
  margin: 10px;
}
button::-moz-focus-inner,
[role="button"]::-moz-focus-inner {
  border: 0;
}
button:active:not([disabled]) {
  box-shadow: inset 0 0 3px 3px #CECFD1;
}
button:active:not([disabled]) > * {
  transform: scale(0.975);
}
button:disabled {
  opacity: 1;
  background: #e0e0e0;
  color: #888;
  cursor: not-allowed;
}


html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}
body {
  background-color: #484848;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='166' height='92' viewBox='0 0 166 92'%3E%3Cdefs%3E%3Cpolygon id='h' points='-25,-43.3 25,-43.3 50,0 25,43.3 -25,43.3 -50,0' fill='black'/%3E%3Cpattern id='p' patternUnits='userSpaceOnUse' width='166' height='92'%3E%3Cuse href='%23h' x='25' y='0'/%3E%3Cuse href='%23h' x='107' y='46'/%3E%3Cuse href='%23h' x='25' y='94'/%3E%3Cuse href='%23h' x='188' y='0'/%3E%3Cuse href='%23h' x='188' y='94'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='166' height='92' fill='url(%23p)'/%3E%3C/svg%3E"),
          linear-gradient(135deg, #020202, #033e62, #020202);
  background-repeat: repeat, no-repeat;
  background-position: -1px 0, 0 0;
  background-size: 40px auto, cover;
  display: flex;
  justify-content: center;
  align-items: center;
}
.container {
  background: linear-gradient(170deg, #e8ecf8 8%, #ffffff 24%, #ffffff 76%, #e8ecf8 92%);
  padding: 20px;
  border-radius: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 914px;
  position: relative;
  height: 570px;
}
/* Header / Branding */
.svg-container {
  text-align: center;
}
.svg-container img {
  max-width: 100%;
}
.eksoh-text {
  font-family: Arial, sans-serif;
  font-weight: bold;
  font-size: 22px;
  margin: 0;
  color: #920300;
}
#linkIntro {
  font-family: Arial, sans-serif;
  font-weight: bold;
  font-size: 22px;
  margin: 0;
  color: #920300;
}
#linkIntro,
#theLink {
  text-align: center;
}
#theLink{
  font-family: Arial, sans-serif;
  font-weight: bold;
  font-size: 22px;
  margin: 12px 0px 8px 0px;
  color: #888888;
}
#placeholderContainer {
  text-align: center;
}
#placeholderContainer ul {
  text-align: left;
}

/* Style for Guest names */
.guest-name {
  color: #7b84ff;
}

/* Style for Host names */
.host-name {
  color: #1c2279;
}


/* Styling for completed/inactive system messages */
.system-message.inactive {
  color: #b0b0b0 !important; /* Lighter grey */
}

.system-message .action-link {
  margin-left: 10px;
  cursor: pointer;
  text-decoration: underline;
}


/* Instructions */
#usernameContainer,
#instructionsContainer {
  text-align: center;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
#instructionsContainer ol,
#instructionsContainer ul {
  padding-left: 20px;
  margin: 0 auto;
  text-align: left;
  display: inline-block;
}
#instructionsContainer li {
  font-family: Arial, sans-serif;
  font-size: 14px;
  margin-bottom: 5px;
}
/* Fade Animations */
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.fade-out {
  animation: fadeOut 1s forwards;
}
.fade-in {
  animation: fadeIn 1s forwards;
}
/* Textarea-Container (for received messages & drop zone) */
.textarea-container {
  position: relative;
  width: 900px;
  top: 0px;
}
/* New Chat Messages area replaces textarea */
.chat-messages {
  width: 100%;
  height: 440px;
  padding: 10px 170px 10px 40px; /* Reserve space for dropzone overlay */
  border: 1px solid #ccc;
  border-bottom: 1px solid #fff;
  border-radius: 40px 40px 0 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
  background: #ffffff;
  padding-top: 40px;
}

.chat-messages {
  overflow-y: scroll;
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* Internet Explorer 10+ */
}

.chat-messages::-webkit-scrollbar {
  display: none;                /* Chrome, Safari, Opera */
}

.chat-messages::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 15%;              /* Place in the middle */
  width: 1px;             /* Line thickness */
  background-color: #ccc; /* Line color */
  transform: translateX(-50%); /* Center it exactly */
}

/* Chat Message Elements */
.message {
  position: relative;
  padding-left: calc(12ch + 10px); /* 12ch for the sender plus a 10px gap */
  margin: 0 0 10px 0;
  max-width: 500px;       /* Limits maximum width */
  white-space: normal;    /* Allows text to wrap */
  overflow-wrap: break-word; /* Breaks long words if needed */
}
.sender {
  position: absolute;
  left: -14px;
  top: 0;
  width: 70px;
  font-weight: bold;
  display: inline-block;
  width: 12ch;           /* roughly 12 characters wide */
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.system-message {
  color: #666;
  font-style: italic;
  margin: 6px 0;
  margin-left: 120px;
}


.text {
  display: inline;
}
/* Input-Container (for message input) */
.input-container {
  position: relative;
  width: 900px;
  top: -22px;
}
.input-container input[type="text"],
.input-container textarea {
  width: 900px;
  padding-left: 40px;
  height: 120px;
  border: 1px solid #ccc;
  border-radius: 0 0 40px 40px;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

.textarea-container,
.input-container,
#downloads {
  display: none;
}

#downloads {
  display: none;
  background: linear-gradient(170deg, #e8ecf8 8%, #ffffff 24%, #ffffff 76%, #e8ecf8 92%);
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 58px;
  position: relative;
  top: -720px;
}

.disabled-download {
  color: grey;
  opacity: 0.5;
  pointer-events: none;
  text-decoration: none;
}

.reject-option {
  color: red;
  cursor: pointer;
  text-decoration: underline;
}

/* Drop Zone Styling */
.drop-zone {
  position: absolute;
  top: 1px;
  right: 0;
  width: 18%;
  height: 100%;
  border-left: 1px double #bbb;
  border-top-right-radius: 40px;
  background: #f8faff;
  border-right: 1px solid #ccc;
  z-index: 2;
  transition: background 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  display: none;
}
.drop-zone.disabled {
  opacity: 1.0;
  background: #dedede;
  cursor: not-allowed;
}
.drop-zone.dragover {
  background: rgba(200, 200, 200, 0.4);
}
.drop-zone-icon {
  width: 55%;
  opacity: 0.3;
  margin-bottom: 10px;
  display: block;
  margin: 0 auto;
}
.drop-zone-footer {
  text-align: left;
  font-size: 0.9rem;
  color: #707070;
  width: 120px;
  display: block;
  margin: 0 auto;
  text-align: center;
  margin-top: 20px;
  margin-bottom: 40px;
}
/* Resize Handle Styling */
.resize-handle {
  width: 100%;
  height: 10px;
  background: #fff;
  cursor: ns-resize;
  position: absolute;
  display: none;
  z-index: 30;
  color: #fff;
}
.resize-handle::before,
.resize-handle::after {
  content: "";
  position: absolute;
  left: calc(50% - 20px);
  width: 40px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  color: #fff;
}
.resize-handle::before {
  top: 2px;
}
.resize-handle::after {
  top: 6px;
}
/* Handle position */
#textarea-handle {
  bottom: -10px;
}
/* Terms Container Styling */
#termsContainer {
  text-align: center;
  margin-top: 20px;
}
#termsCheckbox {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border: 1px solid #ccc;
  border-radius: 1px;
  background-color: #fff;
  cursor: pointer;
  position: relative;
  margin-right: 5px;
  left: 2px;
  top: 3px;
}
#termsCheckbox:checked {
  background-color: #007BFF;
  border-color: #007BFF;
}
#termsCheckbox:checked::after {
  content: '✓';
  position: absolute;
  top: -2px;
  left: 2px;
  color: #fff;
  font-size: 10px;
}
#sendFile {
  border-radius: 6px;
}
#sendFile.fade-in,
#sendFile.fade-out {
  -webkit-appearance: none;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  cursor: pointer;
  width: 150px;
  height: 50px;
  background-image: linear-gradient(to top, #D8D9DB 0%, #fff 80%, #FDFDFD 100%);
  border-radius: 12px;
  border: 1px solid #8F9092;
  box-shadow: inset 0 0 3px 0 #CECFD1;
  transition: all 0.2s ease;
  font-family: "Source Sans Pro", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #606060;
  text-shadow: 0 1px #fff;
  position: relative;
  margin: 10px;
}
#sendFile.fade-in:disabled {
  border-radius: 12px;
  border: 0px;
  cursor: not-allowed;
  color: #c0c0c0;
}
.eksoh-image {
  display: block;
  width: 35%;
  margin: 0 auto;
}
/* Download Notification Styles */
.download-notification {
  background: linear-gradient(170deg, #e8ecf8 8%, #ffffff 24%, #ffffff 76%, #e8ecf8 92%);
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 58px;
  margin-bottom: 10px;
  transition: transform 0.5s ease, opacity 0.5s ease;
  opacity: 1;
}
#sendFile {
  position: static;
  margin: 10px auto !important;
  top: -110px;
  right: -368px;
}
#copyLink {
  position: relative;
  top: 7px;
  left: 2px;
}
#init_username {
  position: relative;
  top: 8px;
  left: 2px;
}

/* Style for the error message overlay */
#user-error-message {
  position: absolute;
  width: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ADD8E6;
  color: black;
  padding: 50px;
  border-radius: 6px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
  display: none;
  text-align: center;
}
#user-error-message.fade-in {
  animation: fadeIn 1s forwards;
}
@media (max-width: 768px) {
  #user-error-message {
    width: 80%;
  }
}

.small-logo {
  position: absolute;
  top: 14px; /* Adjust as needed */
  left: 28px; /* Adjust as needed */
  display: none;
}

textarea::-webkit-resizer {
  display: none; /* Hides the resize handle */
}

textarea {
  resize: none;
}

.resizable-input:focus,
.resizable-textarea:focus {
  outline: none;
}

.resizable-input:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Remove Firefox's inner focus border */
.resizable-input::-moz-focus-inner {
  border: 0;
  padding: 0;
}

/* Target the textarea with id "resizable-input" on focus */
#resizable-input:focus {
  outline: none !important;
  box-shadow: none !important;
  -moz-appearance: none !important;
  -webkit-appearance: none !important;
}

/* Override Firefox’s inner focus border */
#resizable-input::-moz-focus-inner {
  border: 0 !important;
  padding: 0 !important;
}

/* Also remove Firefox’s focus ring if it applies */
#resizable-input:-moz-focusring {
  outline: none !important;
}




/* --- Mobile Overrides for Touch Devices (iOS) --- */
@media only screen and (max-width: 767px) and (pointer: coarse) {
  /* Hide the original desktop drop zone and its contents */
  .drop-zone {
    display: none !important;
  }

  /* Style the new mobile toolbar */
  #mobile-toolbar {
    position: fixed;
    top: 5px;
    right: 5px;
    width: calc(100% - 10px);
    z-index: 1000;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
  }

  #mobile-toolbar .drop-zone-footer-mobile {
    align-items: center;
    background: #f8faff;
    border: 1px solid #ccc;
    border-radius: 12px;
    padding: 0 10px;
    height: 50px;
    flex-grow: 1;
  }

  #mobile-toolbar #enable-dropzone-mobile {
    margin-left: auto;
  }

  #mobile-toolbar #sendFile-mobile {
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 50px;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    line-height: 50px;
    flex-shrink: 0;
  }

  /* Adjust layout for mobile in the container and messaging elements */
  .textarea-container.fade-in {
    position: relative;
    top: 2%;
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
  }

  .input-container input[type="text"],
  .input-container textarea {
    width: 100% !important;
    font-size: 5vw; /* This ensures a legible size on mobile */
  }

  .input-container.fade-in,
  .input-container {
    position: relative;
    top: 0 !important;
    margin-top: 0;
    width: 100%;
    height: auto;
  }

  .input-container textarea {
    font-size: 5vw !important;
    -webkit-text-size-adjust: 100%; /* Prevents auto zoom on iOS */
    text-size-adjust: 100%;
  }

  .container {
    position: absolute;
    top: 14%;
    width: 90%;
    padding: 10px;
    gap: 0;
    /* Modify as needed */
  }

  .message {
    max-width: 100%;
    padding-left: 22vw;
  }

  .sender {
    left: -2px;
    width: 17vw;      /* Adjust width as needed */
    display: inline-block;
    width: 7ch;       /* roughly 7 characters wide */
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .text {
    display: inline-block;
    white-space: normal;
    word-wrap: break-word;
    max-width: 98%;
  }

  .chat-messages {
    padding: 26px 10px 10px 12px;
    font-size: 5vw;
    height: 420px;
  }

  /* --- NEW: Downloads Wrapper Matching the Footer --- */
  /* This rule makes the downloads-wrapper the same size and shape as the drop zone footer,
     so when it is displayed its contents appear over that area. */
  #downloads-wrapper {
    /* keep it up by the mobile toolbar */
    position: fixed !important;
    top: 5px !important;
    right: 130px !important;
    width: auto !important;      /* let its width grow to fit notifications */
    height: auto !important;     /* let it grow in height too */

    /* remove the unwanted box look */
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;

    /* still allow children to show */
    display: block !important;
    z-index: 1500 !important;
    overflow: visible !important;
  }

  /* Optionally tighten up each notification so they stack neatly: */
  #downloads-wrapper .download-notification {
    margin-top: 4px;
  }

  .resize-handle {
    display: block !important;
    position: relative !important;
    margin: 0;
    height: 0;
    background: none;
  }

  .resize-handle::before,
  .resize-handle::after {
    display: none;
  }

  body {
    flex-direction: column;
  }
  .download-notification a.download-link {
  display: inline-block;
  max-width: 12ch;       /* limit to ~20 characters */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  }

  .drop-zone-footer-mobile {
    transition: opacity 0.5s ease;
  }

.chat-messages::after {
  left: 26%;              /* Place in the middle */
  width: 1px;             /* Line thickness */
  transform: translateX(-50%); /* Center it exactly */
}

.system-message {
  margin-left: 96px;
  font-size: 16px;
}

}

@media screen and (max-height: 860px) and (min-width: 769px) {

/* Target tablets and small monitors (but not mobile phones) */

.container {
  background: linear-gradient(170deg, #e8ecf8 8%, #ffffff 24%, #ffffff 76%, #e8ecf8 92%);
  padding: 20px;
  border-radius: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 914px;
  position: relative;
  margin-top: 12%;
  height: 90%;
  max-height: 560px;
}

/* Textarea-Container (for received messages & drop zone) */
.textarea-container {
  position: relative;
  width: 900px;
  top: 0px;
  height: 430px;
}

#resizable-textarea {
  height: 100%;
}


#downloads-wrapper {
  position: relative;
  top: -8%;
}

body {
    /* Keeps the hexagons scrolling naturally, but pins the gradient to the screen */
    background-attachment: scroll, fixed;
  }

}
