/* ============================================================
   CAPSTONEWESTAFRICA FORUM THEME
   Unified Layout for topic List + topic Discussion
   ============================================================ */

* {
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  color: #2c3e50;
  margin: 0;
  padding: 0;
  transition: 0.2s ease;
}


.side-nav-toggler{
  font-size: 20px;
  cursor:pointer;
  font-weight: bold;
  display: none;
}

body, html {
  width: 100%;
  height: 100%;
  background: #f5f6fa;
  overflow-x: hidden;
}

/* ======================= HEADER ======================= */
header {
  position: fixed;
  top: 10px;
  left: 10px;
  right: 10px;
  height: 65px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px;
  z-index: 100;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-title img {
  width: 40px;
  height: 40px;
}
.header-title span {
  font-weight: 700;
  font-size: 15px;
  color: #2c3e50;
}

/* Header Icons */
.other {
  display: flex;
  align-items: center;
  gap: 20px;
}
.other a {
  text-decoration: none;
  font-size: 18px;
  color: #34495E;
  position: relative;
} header .other a .total-notifications{
      position: absolute;
      top: 0;
      background-color:red;
      color:white;
      right: -5px;
      width: 17px;
      height: 17px;
      border-radius: 50%;
      font-size: 10px;
      display: flex;
      align-items: center;
      justify-content: center;

    }
.other a:hover {
  color: #3498db;
  transform: scale(1.1);
}

/* ======================= SIDEBAR NAV ======================= */
nav {
  position: fixed;
  top: 85px;
  left: 10px;
  bottom: 10px;
  width: 240px;
  background: #2c3e50;
  /* background:#3498db; */
  border-radius: 10px;
  padding: 15px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.nav-links {
  padding: 0 15px;
}.nav-links * {
  white-space: nowrap;
}
.nav-links .item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ecf0f1;
  text-decoration: none;
  padding: 10px;
  border-radius: 8px;
  transition: 0.2s;
}
.nav-links .item:hover {
  background: #34495e;
}
.nav-links i {
  font-size: 18px;
  color: white;
}.nav-links span{
    color:white;
}

/* ======================= MAIN AREA ======================= */
main {
  margin-top: 85px;
  margin-left: 265px;
  margin-right: 10px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 20px;
  flex-grow: 1;
  overflow-y: auto;
  min-height: calc(100vh - 100px);
}footer{
  margin-left: 265px;
  margin-right: 10px;
  padding: 20px 0px;
  text-align: center;
  background-color:white;
  margin-top: 25px;
  border-radius:10px;
  margin-bottom: 10px;
  padding: 20px 10px;
}

/* ======================= topic LIST ITEMS ======================= */
.topic-item {
  background: #f9fafc;
  border: 1px solid #e0e4e8;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 20px;
}
.topic-item:hover {
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.topic-item .header {
  font-size: 18px;
  font-weight: 600;
  color: #34495e;
}
.topic-item .content {
  font-size: 15px;
  color: #555;
  margin: 10px 0;
}
.infor {
  margin-top: 10px;
  font-size: 13px;
  color: #7f8c8d;
}

/* ======================= ACTION BUTTONS ======================= */
.actions {
  display: flex;
  align-items: center;
  gap: 25px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.vote-btns, .info-btns {
  display: flex;
  align-items: center;
  gap: 10px;
}
.vote-btns button,
.info-btns button {
  border: none;
  background: #ecf0f1;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.vote-btns button:hover,
.info-btns button:hover {
  background: #3498db;
  color: white;
}
.vote-count, .info-count {
  font-weight: 600;
  color: #555;
  font-size: 14px;
}

.downvote.active *{
  color:red;
}.upvote.active *{
  color:royalblue;
}
/* ======================= topic PAGE (Single Discussion) ======================= */
.topic-wrapper {
  background: white;
  border-radius: 10px;
  padding: 15px 20px;
  margin-bottom: 25px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.topic-title {
  font-size: 22px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 5px;
}
.topic-meta {
  font-size: 13px;
  color: #7f8c8d;
  margin-bottom: 15px;
}
.topic-content {
  font-size: 15px;
  line-height: 1.6;
  color: #444;
  margin-bottom: 15px;
}

/* ======================= COMMENTS ======================= */
.comments-section {
  margin-top: 30px;
}
.comment-wrapper, .replies-inner-wrapper {
  background: #f9fafb;
  border-radius: 8px;
  padding: 10px 15px;
  margin-bottom: 10px;
  border-left: 3px solid #3498db;
}
.comment-meta {
  font-size: 13px;
  color: gray;
  margin-bottom: 5px;
}
.comment-content {
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}
.comment-actions {
  margin-top: 8px;
  font-size: 13px;
  color: #555;
  display: flex;
  gap: 15px;
  align-items: center;
}
.comment-actions i {
  margin-right: 4px;
}
.replies-wrapper, .nested-replies-wrapper {
  margin-top: 10px;
  margin-left: 25px;
  border-left: 1px dashed #ccc;
  padding-left: 10px;
}



/* ====================== FORMS ================== */
main{
      overflow: auto;
    }
     /* -------- CREATE topic FORM -------- */
    .create-topic-wrapper, .forum-form-container {
      max-width: 800px;
      margin: 0 auto;
      background: #fff;
      border-radius: 10px;
      padding: 25px 30px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    .create-topic-wrapper h2, .forum-form-container h2 {
      font-size: 22px;
      font-weight: 700;
      color: #2c3e50;
      margin-bottom: 20px;
    }

    form {
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    label {
      font-weight: 600;
      color: #34495e;
      margin-bottom: 5px;
      display: block;
    }

    input[type="text"],
    input[type="email"],
    select,
    textarea,
    input[type="file"] {
      width: 100%;
      padding: 12px 14px;
      border: 1px solid #dcdde1;
      border-radius: 8px;
      font-size: 14px;
      color: #333;
      background: #f9fafb;
      outline: none;
      transition: border-color 0.2s;
    }
    input[type="file"] {
      background: #f1f3f5;
      cursor: pointer;
    }

    /* ======================= CHECKBOX & RADIO INPUTS ======================= */
input[type="checkbox"],
input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #dcdde1;
  border-radius: 4px;
  background: #f9fafb;
  cursor: pointer;
  display: inline-block;
  position: relative;
  transition: 0.2s ease-in-out;
  vertical-align: middle;
}

/* Hover state */
input[type="checkbox"]:hover,
input[type="radio"]:hover {
  border-color: #3498db;
}

/* Checked state */
input[type="checkbox"]:checked {
  background-color: #3498db;
  border-color: #3498db;
}
input[type="checkbox"]:checked::after {
  content: '✔';
  color: white;
  font-size: 12px;
  position: absolute;
  top: 0;
  left: 3px;
}

/* Radio */
input[type="radio"] {
  border-radius: 50%;
}
input[type="radio"]:checked {
  border-color: #3498db;
  background: radial-gradient(circle at center, #3498db 40%, #f9fafb 40%);
}

/* Label styling */
.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.form-check label {
  font-size: 14px;
  color: #34495e;
  cursor: pointer;
}



    input[type="text"]:focus,
    select:focus,
    textarea:focus {
      border-color: #3498db;
      background: #fff;
    }

    textarea {
      resize: vertical;
      min-height: 150px;
      line-height: 1.5;
    }

    
    .form-row {
      display: flex;
      flex-wrap: wrap;
      gap: 20px;
    }

    .form-row .col {
      flex: 1;
      min-width: 220px;
    }

    .preview-image {
      width: 100%;
      max-height: 200px;
      object-fit: cover;
      border-radius: 8px;
      margin-top: 10px;
      display: none;
    }

    .form-actions {
      display: flex;
      justify-content: flex-end;
      gap: 15px;
      margin-top: 10px;
    }

    .btn {
      padding: 10px 20px;
      border: none;
      border-radius: 8px;
      font-weight: 600;
      cursor: pointer;
      transition: 0.2s;
    }
    button:disabled{
      opacity: 0.6;
      cursor:not-allowed;
    }

    .btn-primary {
      background: #3498db;
      color: white;
    }

    .btn-primary:hover {
      background: #2980b9;
    }

    .btn-secondary {
      background: #ecf0f1;
      color: #2c3e50;
    }

    .btn-secondary:hover {
      background: #d0d7de;
    }

    .hidden{
  /* display: none!important; */
}.no-display{
  display: none;
}

.toggler-btn {
      padding: 10px 10px;
      background-color: royalblue;
      color: white;
      border: none;
      outline: none;
      border-radius: 5px;
      cursor: pointer;
      margin: 10px 0px 10px 0px;

    }


/* ======================= RESPONSIVE ======================= */
@media (max-width: 900px) {
  nav {
    width: 200px;
  }
  main, footer {
    margin-left: 215px;
    transition: 0.4s;
  }
 
}
@media (max-width: 700px) {
  nav {
    /* display: none; */
    transform: translateX(-250px);
    transition:opacity 0.3s , transform 0.4s;
    opacity: 0;
  }nav.active{
    transform: translateX(0);
    opacity: 1;
  }
  main, footer {
    margin-left: 10px;
  }

   .side-nav-toggler{
    display: block;
  }


  nav.active ~ main{
    background-color:green!important
  }

  main.nav-active, footer.nav-active{
    /* margin-left: 225px; */
    transform: translateX(255px);
  }
  
}
















/* File preview container */
.file-preview-wrapper {
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 10px;
  margin-top: 10px;
  background: #fafafa;
  text-align: center;
  overflow: hidden;
}

.file-preview-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.file-preview-iframe {
  width: 100%;
  height: 400px;
  border: none;
  border-radius: 8px;
}

.file-preview-video,
.file-preview-audio {
  width: 100%;
  border-radius: 8px;
}

.file-preview-text {
  text-align: left;
  max-height: 300px;
  overflow-y: auto;
  background: #1e1e1e;
  color: #eee;
  padding: 10px;
  border-radius: 8px;
  font-family: monospace;
}

.file-preview-generic {
  padding: 20px;
  color: #888;
}
.file-preview-generic i {
  font-size: 40px;
  color: #777;
}


ul, ol{
  padding: 20px;
}


.add-comment-box {
  margin-top: 30px;
  background: #fdfdfd;
  border: 1px solid #e0e4e8;
  border-radius: 10px;
  padding: 15px 20px;
}

.add-comment-box h4 {
  font-size: 16px;
  margin-bottom: 10px;
  color: #2c3e50;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 80px;
  padding: 10px;
  border: 1px solid #dcdde1;
  border-radius: 8px;
  background: #f9fafb;
  font-size: 14px;
  color: #333;
}

.comment-form textarea:focus {
  border-color: #3498db;
  background: #fff;
}

.comment-form button {
  align-self: flex-end;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.comment-form button:hover {
  background: #2980b9;
}
