/* Guestbook Popup Window - AIM Style */
.guestbook-popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  max-width: 90%;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.9);
  border: 3px solid var(--magenta);
  border-radius: 5px;
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
  overflow: hidden;
  font-family: Arial, sans-serif;
}

.guestbook-header {
  padding: 5px 10px;
  background: linear-gradient(to right, var(--magenta), var(--yellow));
  color: white;
  font-weight: bold;
  cursor: move;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--magenta);
}
  
.guestbook-close {
  cursor: pointer;
  font-size: 16px;
  color: black;
}

.guestbook-content {
  height: 300px;
  overflow-y: auto;
  padding: 10px;
  background: rgba(20, 20, 20, 0.8);
}

.guestbook-form {
  padding: 10px;
  background: rgba(30, 30, 30, 0.8);
  border-top: 1px solid var(--magenta);
}

.gb-message {
  margin-bottom: 10px;
  padding: 5px;
}

.gb-username {
  font-weight: bold;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
}

.gb-username::before {
  content: "●";
  margin-right: 6px;
  font-size: 12px;
}

.gb-message-content {
  background: rgba(255, 255, 255, 0.1);
  padding: 8px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  line-height: 1.4;
  word-break: break-word;
  white-space: pre-wrap;
}

.gb-message-content strong {
  color: var(--yellow);
  font-weight: bold;
}

.gb-message-content em {
  font-style: italic;
}

.gb-message-content u {
  text-decoration: underline;
}

/* Alternating username colors */
.gb-username.color1 { color: var(--magenta); }
.gb-username.color2 { color: var(--yellow); }
.gb-username.color3 { color: var(--cyan); }
.gb-username.color4 { color: var(--purple); }

.gb-timestamp {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.7em;
  margin-top: 3px;
  text-align: right;
}

#guestbookUsername {
  width: 100%;
  padding: 8px;
  margin-bottom: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--magenta);
  color: white;
  font-family: 'Courier New', monospace;
}

.draggable-popup {
    width: 500px; /* Adjust as needed */
    height: auto; /* Allow dynamic height */
    max-height: 650px; /* Constrain popup height */
    overflow: hidden; /* Prevent content spill */
}

#guestbookMessages {
    width: 100%; /* Match parent width */
    height: 100%; /* Match parent height */
    max-height: 650px; /* Constrain height for scrolling */
    overflow-y: scroll; /* Enable vertical scrollbar */
    overflow-x: hidden; /* Disable horizontal scrollbar */
}

.rich-editor {
  min-height: 60px;
  width: 100%;
  padding: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--magenta);
  color: white;
  font-family: 'Courier New', monospace;
  overflow-y: auto;
  white-space: pre-wrap;
}

.rich-editor:empty:before {
  content: attr(placeholder);
  color: gray;
}

#guestbookError {
  color: var(--magenta);
  font-size: 0.8em;
  margin: 5px 0;
  text-align: center;
  min-height: 1em;
}

#guestbookSubmit {
  background: var(--slime);
  color: black;
  border: none;
  padding: 8px 15px;
  border-radius: 3px;
  cursor: pointer;
  font-weight: bold;
  width: 100%;
}

#guestbookSubmit:hover {
  background: var(--yellow);
}

.formatting-toolbar {
  display: flex;
  gap: 5px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: center;
  background: rgba(30, 30, 30, 0.8);
  padding: 8px;
  border-radius: 3px;
  border: 1px solid var(--magenta);
}

.formatting-toolbar button, 
.formatting-toolbar select {
  height: 30px;
  min-width: 40px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--magenta);
  color: white;
  font-family: 'Courier New', monospace;
  cursor: pointer;
  padding: 0 8px;
  font-size: 12px;
  margin: 0;
  box-sizing: border-box;
}

.formatting-toolbar button:hover {
  background: var(--magenta);
  color: black;
}


.formatting-toolbar select {
  padding: 0 8px;
  min-width: 120px;
}

.formatting-toolbar button:hover,
.formatting-toolbar select:hover {
  background: var(--magenta);
  color: black;
}

.formatting-toolbar select option {
  background: #000;
  color: white;
}

.formatting-toolbar > * {
  height: 30px;
  box-sizing: border-box;
}

/* Make the B/I/U buttons square */
#boldBtn, #italicBtn, #underlineBtn {
  width: 30px;
  padding: 0;
}

/* Emoticon select styling */
#emoticonSelect {
  min-width: 100px; /* Reduced from 150px */
  width: auto; 
  max-width: 100px; /* Prevent it from expanding too much */
}

#fontSelect {
min-width: 100px;
    width: 100px;
max-width: 100px; /* Prevent it from expanding too much */
}

#colorSelect {
    min-width: 95px;
    width: 95px;
max-width: 95px; /* Prevent it from expanding too much */

}