@font-face {
  font-family: 'pixel';
  src: url('vt323-regular-webfont.woff2');
}

body {
 margin:0
}


#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #2c3e50;
  padding: 5px;
  z-index: 100;
  color: #ecf0f1;
  font-family: pixel, Arial, sans-serif;
  font-size: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center; 
}

#controls {
  display: flex;
  align-items: center;
}

#search-form {
  display: flex;
  margin-right: 10px;
}

.search-container {
  position: relative;
  display: inline-block;
}

#search-input {
  font-family: pixel, Arial, sans-serif;
  font-size: 18px;
  padding: 5px 25px 5px 5px;
  border: none;
  border-radius: 5px;
  width: 200px;
  height: 38px;
  box-sizing: border-box;
}

.clear-search {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #999;
  font-size: 18px;
  display: none;
}

.clear-search-button {
  background-color: #3498db;
  border: none;
  padding: 8px 16px;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border-radius: 5px;
  font-size: 22px;
  font-family: pixel, Arial;
  text-decoration: none;
}

.clear-search-button:hover {
  background-color: #2980b9;
}

.no-results #controls .stumble-link,
.no-results #controls .favorite-link,
.no-results #controls .flag-link,
.no-results #url-display,
.no-results #url-display-phone {
  display: none !important;
}

#search-input:not(:placeholder-shown) + .clear-search {
  display: block;
}

.search-button {
  background-color: #3498db;
  border: none;
  padding: 7px !important;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border-radius: 0 5px 5px 0;
  font-size: 18px;
  font-family: pixel, Arial;
}

.search-button:hover {
  background-color: #2980b9;
}

/* Dark-mode toggle */
#dark-mode-toggle{
  background:none;
  border:none;
  color:#ecf0f1;
  cursor:pointer;
  font-size:24px;
  padding:0 10px;
}

.next-button, .ok-button {
  background-color: #3498db;
  border: none;
  padding: 8px !important;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border-radius: 5px;
  margin-right: 10px;
  font-size:22px;
  font-family:pixel,Arial;
  min-width: 100px;
}


#header button:not(#dark-mode-toggle):not(.favorite-link):not(.flag-link):hover {
  background-color: #2980b9;
}

#dark-mode-toggle:hover {
  background-color: transparent;   /* no blue highlight */
}

#header #url-display, #header #url-display-phone {
  font-size: 20px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width:21vw;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  padding: 5px 10px;
  min-width:300px;
}

/* --- always show the compact “phone” url label --- */
#header #url-display       { display:none !important; }
#header #url-display-phone { display:inline-block !important; }

#header #url-display-phone {
  display:none;
  min-width:10px;
}

#header a, .favorite-link, .flag-link {
  color: white;
  text-decoration: none;
}

.flag-danger {
  color: red;
}

#header .middle a, #header .right a, .favorite-link, .flag-link {
  padding: 0 10px;
}

.favorite-link, .flag-link {
  font-family: pixel, Arial, sans-serif;
  font-size: 20px;
  background: none;
  border: none;
  cursor: pointer;
}

#header .favorite-link:hover, #header .flag-link:hover {
  background-color: transparent;
}

.middle {
  flex: 1;
  text-align: center;
}

.middle form {
  display: inline-block;
}

.right {
  flex: 1;
  text-align: right;
  max-width: 410px;
  display: flex;
  align-items: center;
}

#search-form {
  margin-right: 10px;
}

#content {
  padding-top: 60px;
  height: calc(100vh - 60px);
}

#content iframe { 
  border: none;
  width:100%;
  height:100%;
}

#content-yt {
  display: flex;
  justify-content: center;
  align-items: center;
  height: calc(100vh - 58px);
}

#content-yt iframe {
  border: none;
}

.popup-container {
  display: inline-block;
  position: relative;
  padding: 0 10px;
}

.popup {
  display: none;
  position: absolute;
  left: 0;
  background-color: #2c3e50;
  color: #ecf0f1;
  padding: 15px;
  border: 1px solid #000;
  z-index: 1000;
  width: 420px;
  overflow-y: auto;
  max-height: 80vh;
  line-height: 1em;
}

.popup-radio {
  display: none;
}

.popup-radio:checked + .popup {
  display: block;
}

.close-popup-button {
  position: absolute;
  top: 10px;
  right: 25px;
  color:red;
  cursor: pointer;
  font-size: 30px;
  font-weight: bold;
}


.note-textarea {
  width: 100%;
  padding: 5px;
  margin-bottom: 10px;
  box-sizing: border-box;
  height: 7em;
  font-size: 1em;
}

.popup-link {
  cursor: pointer;
  position: relative;
  display: inline-block;
}

.note {
  margin-bottom: 10px;
  text-align: left;
}

.note-time {
  color: #95a5a6;
}

.alternate {
  background-color: rgba(255, 255, 255, 0.05);
}

.button.ok-button,
.button.cancel-button {
  width: 100px;
  cursor: pointer;

}

.button.cancel-button {
  background-color: indianred;
  padding: 8px;
  border-radius:5px;
}

.share-option {
  display: block;
  padding: 5px;
  text-decoration: none;
  color: #ecf0f1;
  cursor: pointer;
  font-weight : 700
}

.share-option:hover {
  background-color: rgba(255, 255, 255, 0.1);
  font-weight: 700;
}

.spread-love {
  width: 256px;
}


.spread-love label.cancel-button {
  display: block;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.rss-popup {
 text-align:center;
 left:-110px;
 top: 41px;
}

.right-popup-container {
  text-align: left; /* Align left within the right section */
}

.right-popup {
  right: 0; /* Align the popup to the right side */
  left: -270px;
  top: 41px;
}

#header .container-link {
  vertical-align:unset;
  padding:0 !important;
  text-decoration:underline;
}

#author {
  max-width: 220px;
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

#logo {
 padding-right: 30px;
 width: 53px;
 height: 45px;
}

svg {
 vertical-align:middle;
}

.kagi-gif {
  height: 30px; /* Adjust height as needed */
  vertical-align: middle; /* Align with other header elements */
  margin: 0 5px; /* Add some spacing */
}



@media (max-width: 1330px) {
  .right {
    display: none;
  }
}

@media (max-width: 700px) {
  .middle {
    display: none;
  }
 .right-popup {
   right: 0; /* Align the popup to the right side */
   left: -220px;
 }
}

@media (max-width: 960px) {
  #switch {
    display: none;
  }
}

@media (max-width: 500px) {
  .popup {
    width:360px;
  }
}


.stumble-link button {
    pointer-events: none;
    opacity: 0.4;
    animation: enableButton 0s forwards 1s;   /* was 1.3125s */
}

/* Emoji reactions */
#reactions { display:flex; align-items:center; gap:6px; }

.emoji-form   { display:inline-block; }
.emoji-badge  {
  display:flex; align-items:center; gap:4px;
  background:transparent;               /* no bg by default */
  color:#ecf0f1;                        /* near-white text */
  border:none; border-radius:9999px;
  padding:2px 8px; font-size:18px; cursor:pointer;
}
body.dark .emoji-badge,
.dark-mode .emoji-badge { background:transparent; color:#ecf0f1; }

.emoji-badge:hover {
  background:#2980b9;           /* blue hover background */
  box-shadow:none;
}

.emoji-add-btn { cursor:pointer; display:inline-flex; }

.emoji-popup { width:200px; text-align:center; }

.emoji-option {
  background:none; border:none; font-size:24px; padding:4px; cursor:pointer;
}
.emoji-option:hover { background:rgba(255,255,255,0.1); }


#header {
    pointer-events: none;
    opacity: 0.85;
    animation: enableButton 0s forwards 1s;   /* was 1.3125s */
}

@keyframes enableButton {
    to {
      pointer-events: auto;
      opacity: 1;
    }
  }

