body {
  display: flex;
  font-family: Arial, sans-serif;
  background-color: #f4f6f8;
  margin: 0;
  padding: 20px;
  flex-direction: column;
}

.top-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
}

.left, .right {
  padding: 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.left {
  width: 50%;
}

.right {
  width: 50%;
}

h2 {
  margin-top: 0;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.appointment-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #ddd;
  gap: 10px;
}

.appointment-info {
  flex-grow: 1;
  font-size: 16px;
}

.view-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 160px;
}

.view-button {
  background-color: #0eb3c7;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 6px 12px;
  cursor: pointer;
  margin-bottom: 5px;
}

.video-box {
  margin-top: 5px;
  padding: 10px;
  border-radius: 8px;
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  font-size: 14px;
  max-width: 300px;
}

input, select {
  width: 100%;
  margin-bottom: 10px;
  padding: 8px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

button[type="submit"] {
  padding: 10px 15px;
  background-color: #0eb3c7;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

/* container now expands wide */
#app {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  width: 90vw;
  max-width: 800px;
  text-align: center;
}

#videoContainer {
  margin-top: 30px;
  padding: 20px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#noObservation {
  padding: 15px;
  background: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 15px;
}

/* VIDEO GRID */
.video-grid {
  display: grid;
  width: 100%;
  gap: 10px;
}

/* Tiles automatically size based on count */
.video-grid.single-tile {
  grid-template-columns: 1fr;
}
.video-grid.two-tiles {
  grid-template-columns: 1fr 1fr;
}
.video-grid.three-tiles {
  grid-template-columns: 1fr 1fr 1fr;
}
.video-grid.four-tiles,
.video-grid.five-tiles,
.video-grid.six-tiles {
  grid-template-columns: 1fr 1fr 1fr;
}

/* VIDEO TILE */
.video-tile {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Video wrapper for aspect ratio */
.video-tile .video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}

/* Remote video full container */
.video-tile .video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Local self-view overlay */
.video-tile .video-wrapper video[id^="video-local-"] {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 25%;
  height: auto;
  border: 2px solid #fff;
  border-radius: 4px;
  z-index: 2;
}

/* Controls below video */
.video-tile .controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 8px 0;
  background: #fff;
  border-top: 1px solid #ccc;
}

/* Control buttons
.control-btn {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 8px;
  background-color: #0078d7;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 60%;
  cursor: pointer;
  transition: background-color .2s;
}

.control-btn:disabled {
  background-color: #aaa;
  cursor: not-allowed;
} */

.btn-video.on {
  background-image: url('https://unpkg.com/feather-icons/dist/icons/video.svg');
}
.btn-video.off {
  background-image: url('https://unpkg.com/feather-icons/dist/icons/video-off.svg');
}

.btn-mic.on {
  background-image: url('https://unpkg.com/feather-icons/dist/icons/mic.svg');
}
.btn-mic.off {
  background-image: url('https://unpkg.com/feather-icons/dist/icons/mic-off.svg');
}

.btn-speaker.on {
  background-image: url('https://unpkg.com/feather-icons/dist/icons/volume-2.svg');
}
.btn-speaker.off {
  background-image: url('https://unpkg.com/feather-icons/dist/icons/volume-x.svg');
}

.btn-end {
  background-image: url('https://unpkg.com/feather-icons/dist/icons/phone-off.svg');
}

/* SMS section */
.sms-box {
  background: #f9f9f9;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 220px;
  position: relative;
}

.sms-box input {
  flex: 1;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid #bbb;
}
.sms-box button:not(.close-sms) {
  padding: 6px 12px;
  border-radius: 4px;
  background-color: #0a2136;
  color: white;
  border: none;
  cursor: pointer;
}

.sms-link {
  display: inline-block;
  margin-top: 5px;
  background-color: #0eb3c7;
  color: white;
  padding: 6px 12px;
  border-radius: 5px;
  text-decoration: none;
}

.close-sms {
  position: absolute;
  top: -3px;
  right: -2px;
  background: none;
  border: none;
  color: red;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}

.close-sms:focus {
  outline: none;
  box-shadow: none;
}

.sms-button {
  background-color: #0a2136 !important;
}

.parent-selection {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}

.parent-btn {
  flex: 1;
  padding: 4px 6px;
  font-size: 13px;
  background-color: #0eb3c7;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.other-input input {
  width: 100%;
  padding: 5px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid #bbb;
}

.confirm-btn {
  background-color: #0a2136;
  color: white;
  border: none;
  padding: 6px;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  font-size: 13px;
}

#selfviewContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 2in;
  height: 2in;
  margin-top: 15px;
  background: black;
  border: 2px solid #ccc;
  border-radius: 8px;
  position: relative;
}

#selfviewContainer video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.selfview-close {
  position: absolute;
  top: 2px;
  right: 2px;
  background: red;
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  cursor: pointer;
  font-weight: bold;
  line-height: 16px;
}

.video-header {
  background-color: #0a2136;
  color: white;
  text-align: center;
  padding: 4px;
  font-size: 14px;
  font-weight: bold;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}
