/* * Wiki - Public Dashboard Styles
 * Targets: Simple 4-Column Category Grid Layout
 */

:root {
  --wiki-primary-color: #0073aa; /* Standard Link Blue */
  --wiki-secondary-color: #2c3338; /* Dark Grey Titles */
  --wiki-border-color: #e0e0e0;
}

/* ---------------------------------- */
/* 1. Global Container & Header (Keep)*/
/* ---------------------------------- */

.wiki-hub-container {
  max-width: 1200px;
  margin: 30px auto;
  padding: 20px;
  background: #fcfcfc;
  border-radius: 8px;
  border: 1px solid var(--wiki-border-color);
}

.wiki-header {
  display: flex;
  align-items: center;
  padding-bottom: 20px;
  margin-bottom: 30px;
  border-bottom: 2px solid var(--wiki-border-color);
  justify-content: space-between;
}

.wiki-search-form {
  position: relative;
}

/* Style for the input field */
.wiki-search-input {
  /* Dimensions and spacing */
  max-width: 200px; /* Optional: Restrict width for better aesthetics on wide screens */
  padding: 12px 20px 12px 45px; /* Added padding on left for icon */

  /* Appearance */
  font-size: 16px;
  line-height: 1.5;
  color: #333;
  background-color: #fff;

  /* Border and shadow */
  border: 1px solid #ddd;
  border-radius: 8px; /* Slightly rounded corners */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* Subtle lift */

  /* Smooth transitions for focus effects */
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;

  /* Remove default appearance settings */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* 🔍 Add a search icon inside the input field */
.wiki-search-form::before {
  content: "🔍"; /* Search emoji or use a Unicode icon: \f002 (FontAwesome) */
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  font-size: 18px;
  pointer-events: none; /* Allows clicks to pass through to the input */
  z-index: 10;
}

/* Focus state for enhanced usability and visibility */
.wiki-search-input:focus {
  border-color: #0073aa; /* WordPress primary blue */
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.3); /* Blue outline effect */
  outline: none; /* Remove default browser focus outline */
  background-color: #fafafa; /* Slight color change on focus */
}

/* Placeholder styling (optional but nice) */
.wiki-search-input::placeholder {
  color: #aaa;
  opacity: 1; /* For Firefox compatibility */
}

.wiki-logo img {
  max-height: 40px;
  width: auto;
  margin-right: 20px;
  border-radius: 4px;
}

.wiki-header h1 {
  margin: 0;
  font-size: 1.6em;
  color: var(--wiki-secondary-color);
  font-weight: 600;
}

/* ---------------------------------- */
/* 2. Category Grid Layout (NEW)      */
/* ---------------------------------- */

.wiki-category-grid {
  display: grid;
  /* Main requirement: max 4 columns, auto-fitting */
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px; /* Space between category columns */
}

.wiki-category-column {
  /* Optional: Add a light divider between columns */
  padding-right: 15px;
  border-right: 1px dashed var(--wiki-border-color);
}

.wiki-category-column:last-child {
  border-right: none;
  padding-right: 0;
}

.wiki-category-title {
  font-size: 0.8em;
  font-weight: 700;
  color: var(--wiki-secondary-color);
  margin: 0 0 10px 0;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--wiki-primary-color);
}

.wiki-category-description {
  font-size: 0.6em;
  color: #777;
  margin-bottom: 15px;
}

/* ---------------------------------- */
/* 3. Simple Link List (NEW)          */
/* ---------------------------------- */

.wiki-links-list ul {
  list-style: none; /* Remove standard bullet points */
  margin: 0;
  padding: 0;
}

.wiki-links-list li {
  margin-bottom: 8px;
  line-height: 1.4;
  font-size: 0.7em;
}

.wiki-simple-link {
  color: var(--wiki-primary-color); /* Blue Title */
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
}

.wiki-simple-link:hover {
  text-decoration: underline;
}

.wiki-hint-inline {
  font-size: 0.85em;
  color: #999;
}

/* ---------------------------------- */
/* 4. Mobile Responsiveness           */
/* ---------------------------------- */

@media (max-width: 900px) {
  /* Reduce to 2 columns on medium screens */
  .wiki-category-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }

  /* Remove vertical divider between columns on medium/small devices */
  .wiki-category-column {
    border-right: none;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px dashed var(--wiki-border-color);
  }
  .wiki-category-column:last-child {
    border-bottom: none;
  }
}

@media (max-width: 550px) {
  /* Force single column layout on small screens for better readability */
  .wiki-category-grid {
    grid-template-columns: 1fr;
  }
}
