/* === RESET BASE === */
* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", Geneva, Arial, Helvetica, sans-serif;
  font-size: 14px;
  color: #e0e0e0;
  background-color: #121212;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

/* === MESSAGGI === */
.msg {
  padding: 8px 12px;
  margin: 12px 0;
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
}

.msg_add {
  padding: 8px 10px;
  display: inline-block;
  background: #2a2a2a;
  border-radius: 4px;
  font-size: 13px;
}

.msg_title {
  display: inline-block;
  padding-right: 6px;
  font-weight: 600;
  color: #fff;
}

/* === COLORI === */
.red { color: #ff4d4d; }
.green { color: #4dff88; }
.yellow { color: #ffd84d; }
.blue { color: #4db8ff; }
.lightblue { color: #66e0ff; }
.pink { color: #e066ff; }
.grey { color: #999; }
.white { color: #fff; }

/* === SEZIONI GENERICHE === */
.fb_container {
  background: #181818;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}

/* Header di sezione */
.fb_container .item .header {
  background: linear-gradient(90deg, #222, #1a1a1a);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fb_container .item .header .title {
  font-weight: bold;
  color: #fff;
  font-size: 14px;
}

.fb_container .item .header .action {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.fb_container .item .header .action:hover {
  background: #444;
}

/* Contenuto */
.fb_container .item .middle {
  padding: 12px;
  border-top: 1px solid #2a2a2a;
}

.fb_container .item .middle div {
  padding: 6px 0;
}

/* Footer */
.fb_container .item .bottom {
  height: 4px;
  background: #222;
}

/* === CONTEXT MENU === */
.contextMenu {
  display: flex;
  align-items: center;
  background: #202020;
  border-top: 1px solid #2a2a2a;
  padding: 6px;
  gap: 6px;
}

.contextMenu .menuItem {
  background: #2a2a2a;
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 13px;
}

.contextMenu .menuItem:hover {
  background: #3a3a3a;
}

.contextMenu .menuItem.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* === OVERLAY === */
div.overlay {
  height: 100%;
  width: 100%;
  display: none;
  z-index: 999;
  background-color: rgba(0, 0, 0, 0.7);
  position: fixed;
  top: 0;
  left: 0;
}

.fb_gen_overlay {
  max-width: 90%;
  width: 400px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  position: fixed;
  z-index: 1000;
  background: #1b1b1b;
  border: 1px solid #333;
  border-radius: 8px;
}

/* === INFO === */
.info {
  font-size: 12px;
  color: #888;
}

.info strong {
  text-decoration: underline;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  #fb_settings,
  #fb_msgs,
  #fb_output,
  .fb_gen,
  #colorcodes {
    width: 100%;
    position: relative;
    left: 0;
    margin: 10px 0;
  }

  .fb_container .item .header .title {
    font-size: 13px;
  }

  .fb_container .item .middle {
    padding: 10px;
  }
}
