@import url("https://fonts.googleapis.com/css?family=Lato:400,400i,700");

body {
  margin: 0;
  font-family: 'Lato', sans-serif;
}

.header {
  min-height: 60vh;
  background: #243b55;
  color: white;
  clip-path: ellipse(100vw 60vh at 50% 50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.details {
  text-align: center;
}

.profile-pic {
  object-fit: cover;
  width: 50px;
  height: 100px;
  width: 6rem;
  object-fit: center;
  border-radius: 50%;
  border: 4px solid #fff;
}

.location p {
  display: inline-block;
}

.location svg {
  vertical-align: middle;
}

.stats {
  display: flex;
}

.stats .col-4 {
  width: 10rem;
  text-align: center;
}

.heading {
  font-weight: 400;
  font-size: 1.3rem;
  margin: 1rem 0;
}


.header_alter{
  color: #009FFF;
}

html {
  height: 100%;
}
body {
  margin:0;
  padding:0;
  font-family: sans-serif;
  background: linear-gradient(#141e30, #243b55);
}

.login-box {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400px;
  padding: 40px;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,.5);
  box-sizing: border-box;
  box-shadow: 0 15px 25px rgba(0,0,0,.6);
  border-radius: 10px;
}

.login-box h2 {
  margin: 0 0 30px;
  padding: 0;
  color: #fff;
  text-align: center;
}

.login-box .user-box {
  position: relative;
}

.login-box .user-box input {
  width: 100%;
  padding: 10px 0;
  font-size: 16px;
  color: #fff;
  margin-bottom: 30px;
  border: none;
  border-bottom: 1px solid #fff;
  outline: none;
  background: transparent;
}
.login-box .user-box label {
  position: absolute;
  top:0;
  left: 0;
  padding: 10px 0;
  font-size: 16px;
  color: #fff;
  pointer-events: none;
  transition: .5s;
}

.login-box .user-box input:focus ~ label,
.login-box .user-box input:valid ~ label {
  top: -20px;
  left: 0;
  color: #03e9f4;
  font-size: 12px;
}

.login-box form a {
  position: relative;
  display: inline-block;
  padding: 10px 20px;
  color: #03e9f4;
  font-size: 16px;
  text-decoration: none;
  text-transform: uppercase;
  overflow: hidden;
  transition: .5s;
  margin-top: 40px;
  letter-spacing: 4px
}

.login-box a:hover {
  background: #03e9f4;
  color: #fff;
  border-radius: 5px;
  box-shadow: 0 0 5px #03e9f4,
              0 0 25px #03e9f4,
              0 0 50px #03e9f4,
              0 0 100px #03e9f4;
}

.login-box a span {
  position: absolute;
  display: block;
}

.login-box a span:nth-child(1) {
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #03e9f4);
  animation: btn-anim1 1s linear infinite;
}

@keyframes btn-anim1 {
  0% {
    left: -100%;
  }
  50%,100% {
    left: 100%;
  }
}

.login-box a span:nth-child(2) {
  top: -100%;
  right: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, transparent, #03e9f4);
  animation: btn-anim2 1s linear infinite;
  animation-delay: .25s
}

@keyframes btn-anim2 {
  0% {
    top: -100%;
  }
  50%,100% {
    top: 100%;
  }
}

.login-box a span:nth-child(3) {
  bottom: 0;
  right: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(270deg, transparent, #03e9f4);
  animation: btn-anim3 1s linear infinite;
  animation-delay: .5s
}

@keyframes btn-anim3 {
  0% {
    right: -100%;
  }
  50%,100% {
    right: 100%;
  }
}

.login-box a span:nth-child(4) {
  bottom: -100%;
  left: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(360deg, transparent, #03e9f4);
  animation: btn-anim4 1s linear infinite;
  animation-delay: .75s
}

@keyframes btn-anim4 {
  0% {
    bottom: -100%;
  }
  50%,100% {
    bottom: 100%;
  }
}
.chat-box {
    max-height: 500px;
    overflow-y: auto;
    position: relative;
}

.chat.outgoing .details {
    position: relative;
}

.menu-container {
    position: absolute;
    top: 5px;
    right: 5px;
}
.menu-btn {
    cursor: pointer;
    font-size: 18px;
    padding: 3px;
    color: #666;
}
.menu-dropdown {
    display: none;
    position: absolute;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    min-width: 100px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 200;
}
.menu-dropdown span {
    display: block;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
}
.menu-dropdown span:hover {
    background: #f5f5f5;
}
.menu-dropdown.show {
    display: block;
}


.typing-area button {
  opacity: 0.7;
  pointer-events: none;
}
.typing-area button.active {
  opacity: 1;
  pointer-events: auto;
}


.deleted-msg {
  background: #ffcccc !important;
  color: #a00 !important;
  font-size: 6px;
  border-radius: 12px;
  padding: 6px 10px;
  display: inline-block;
}


/* Chat image styling */
.chat-img {
    max-width: 200px;      /* maximum width */
    max-height: 200px;     /* maximum height */
    width: auto;
    height: auto;
    border-radius: 10px;
    margin: 5px 0;
    object-fit: cover;
}

/* File input styling */
.file-input-container {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.file-input-container input[type="file"] {
    font-size: 100px;
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
}

.file-input-btn {
    display: inline-block;
    background-color: #333;
    color: #fff;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.file-input-btn:hover {
    background-color: #555;
}


/* File input button */
.file-input-container {
    position: relative;
    display: inline-block;
}
.file-input-container input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 40px;
    height: 40px;
    cursor: pointer;
}
.file-input-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #333;
    color: #fff;
    font-size: 18px;
    border-radius: 5px;
    cursor: pointer;
}

.chat-img {
    max-width: 250px; /* uniform size for sender and receiver */
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 5px 0;
    display: block;
}

.download-btn {
    display: inline-block;
    font-size: 14px;
    color: #fff;
    background: #333;
    padding: 2px 6px;
    border-radius: 5px;
    margin-top: 2px;
    cursor: pointer;
    text-decoration: none;
}

.chat .details a {
    display: inline-block;
    position: relative;
}

.chat .details a:hover .download-btn {
    background: #ff4b4b;
}


.chat-img-container {
    position: relative;
    display: inline-block;
    max-width: 250px;
    margin: 5px 0;
}

.chat-img {
    max-width: 250px;
    height: auto;
    border-radius: 10px;
    display: block;
}

.download-btn {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: #fff;
    background: #333;
    padding: 2px 5px;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
}

.profile-img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

/* Profile images remain small */
.chat-box .incoming .profile-img,
.chat-box .outgoing .profile-img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

/* Chat images responsive */
.chat-img-container {
    display: inline-block;
    margin-top: 5px;
}

.chat-img-container img.chat-img {
    max-width: 250px;
    height: auto;
    border-radius: 10px;
    display: block;
}

/* Download button style */
.chat-img-container .download-btn {
    display: inline-block;
    margin-top: 3px;
    font-size: 12px;
    color: #fff;
    background: #333;
    padding: 3px 6px;
    border-radius: 5px;
    text-decoration: none;
}
.chat-img-container .download-btn:hover {
    background: #555;
}

.msg-status {
    font-size: 12px;
    margin-left: 6px;
}

.msg-status.sent {
    color: gray; /* Single tick */
}

.msg-status.seen {
    color: #0b93f6; /* Double blue ticks */
}
.status {
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background-color: gray; /* default offline */
}

.status.online { background-color: #00cc66; }
.status.offline { background-color: gray; }



/* Center container */
.status-toggle-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 70px;  /* bigger for visibility */
  height: 38px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #555;  /* dark grey for offline */
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 30px; width: 30px;
  left: 4px; bottom: 4px;
  background-color: #fff;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #00ff00; /* bright green for active */
}

input:checked + .slider:before {
  transform: translateX(32px);
}

/* Status text */
#status-text {
  margin-left: 15px;
  font-weight: bold;
  color: #fff; /* white text for black background */
  font-size: 18px;
}

/* Responsive */
@media (max-width: 600px) {
  .switch {
    width: 60px;
    height: 32px;
  }
  .slider:before {
    height: 26px;
    width: 26px;
  }
  #status-text {
    font-size: 16px;
  }
}

