/*
==========================================
  Layout Refresh CSS 2026
  Author: Arya
  Purpose: New UI system (modals, search, filters, cards)
  Notes:
  - Scoped under .nw-ui
  - Does not override legacy styles
  - Built for incremental migration
==========================================
*/

/*NEW Search Start here*/
/* ================= BACKDROP ================= */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;

  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 80px;
}

/* ================= MODAL BOX ================= */
.modal-content {
  width: 700px;
  max-width: 92%;
  background: #f5f6f7;
  border-radius: 16px !important;
  overflow: hidden !important;

  display: flex;
  flex-direction: column;
  max-height: 80vh !important;
  margin: 0 !important;
  padding: 0 !important;

  box-shadow: 
    0 10px 30px rgba(0,0,0,0.1),
    0 30px 80px rgba(0,0,0,0.15);
}

/* ================= HEADER ================= */
.nw-command-search {
  background: #f4f4f4; /* light neutral gray */
}
.nw-command-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

/* ICON + CLOSE */
.nw-command-input .icon,
.nw-command-input .close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* INPUT */
.nw-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
}

/* CLOSE BUTTON */
.nw-command-input .close {
  border-radius: 50%;
  background: #f1f5f9;
  color: #6b7280;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.5;
}

.nw-command-input .close.active {
  opacity: 1;
  background: #e2e8f0;
}

.nw-command-input .close:hover {
  background: #e2e8f0;
  color: #111827;
}

/* ================= FILTERS ================= */
.nw-search-filters {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
}

.nw-search-filters button {
  display: flex;
  align-items: center;
  gap: 6px;

  padding: 5px 10px;
  font-size: 12px;
  line-height: 16px;
  border-radius: 999px;

  border: 1px solid #dadada;
  background: #e6f0ff;

  cursor: pointer;
  transition: all 0.2s ease;
}

/* ICON */
.f-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.f-icon svg {
  width: 14px;
  height: 14px;
  stroke: #6b7280;
  transition: stroke 0.2s ease;
}

/* HOVER */
.nw-search-filters button:hover {
  background: #1f4ea3;
  color: #fff;
  border-color: #1f4ea3;
}

.nw-search-filters button:hover .f-icon svg {
  stroke: #fff;
}

/* ACTIVE */
.nw-search-filters button.active {
  background: #1f4ea3;
  color: #fff;
  border-color: #1f4ea3;
}

.nw-search-filters button.active .f-icon svg {
  stroke: #fff;
}

/* PRESS EFFECT */
.nw-search-filters button:active {
  /*transform: scale(0.96);*/
}

/* ================= RESULTS ================= */
.nw-command-results {
  overflow-y: auto;
  max-height: 55vh;
  position: relative;

  scrollbar-width: thin;
  scrollbar-color: #1f4ea3 transparent;
}

/* SCROLLBAR (WebKit) */
.nw-command-results::-webkit-scrollbar {
  width: 6px;
}

.nw-command-results::-webkit-scrollbar-track {
  background: transparent;
}

.nw-command-results::-webkit-scrollbar-thumb {
  background: #cbd5f5;
  border-radius: 999px;
}

.nw-command-results::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* SCROLL FADE */
.nw-command-results::before,
.nw-command-results::after {
  content: "";
  position: sticky;
  left: 0;
  right: 0;
  height: 10px;
  pointer-events: none;
  z-index: 2;
}

.nw-command-results::before {
  top: 0;
  background: linear-gradient(to bottom, #f5f6f7, transparent);
}

.nw-command-results::after {
  bottom: 0;
  background: linear-gradient(to top, #f5f6f7, transparent);
}

/* ================= ITEM ================= */
.nw-search-item {
  display: flex;
  gap: 12px;
  padding: 10px 14px;
  margin: 6px 12px;

  border-radius: 10px;
  background: #f8fafc;

  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);

  text-decoration: none;
  cursor: pointer;

  transition: all 0.2s ease;
  animation: fadeSlide 0.2s ease;
}

.nw-search-item:hover {
  background: #fff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.nw-search-item.active {
  background: #e0ecff;
  border-color: #c7d2fe;
}

/* ICON */
.nw-search-icon {
  width: 32px;
  height: 32px;
  background: #eef2ff;
  border-radius: 8px;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nw-search-icon svg {
  width: 16px;
  height: 16px;
  stroke: #1f4ea3;
}

/* TEXT */
.nw-search-title {
  font-size: 15px;
  font-weight: 500;
  color: initial;
}

.nw-search-type {
  font-size: 12px;
  color: #6b7280;
}
.nw-search-item::after {
  content: "";
  margin-left: auto;
  width: 14px;
  height: 14px;

  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%239ca3af' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M18 13v6H6V6h6'/%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14L21 3'/%3E%3C/svg%3E") no-repeat center;

  opacity: 0;
  transform: translateX(0);
  transition: all 0.2s ease;
}

.nw-search-item:hover::after {
  opacity: 1;
  transform: translateX(3px);
}

/* ================= STATES ================= */
.search-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  font-size: 14px;
  color: #6b7280;
  animation: fadeIn 0.2s ease;
}

.empty-state {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9ca3af;
  font-size: 13px;
}

/* ================= ANIMATIONS ================= */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= ACCESSIBILITY ================= */
.nw-search-filters button:focus,
.nw-search-item:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(31, 78, 163, 0.3);
}

/* ================= HIGHLIGHT ================= */
.highlighted {
  color: #1f4ea3;
}
@media screen and (max-width: 1280px) {
   header .holder
 {
        width: 980px;
        margin: auto;
    }
}
@media (max-width: 768px){
   header .holder {
        width: 100%;
        margin: auto;
    }
  .nw-search-filters {
    gap: 4px;
    padding: 12px 10px;
}
.nw-search-title {
    font-size: 14px;
}
.nw-search-type {
        display: none;
}
#comments, .navigation.post-navigation {
    width: 75%;
    margin: auto;
}
.single #InnerBanner h1 {
    font-size: 38px;
}
}
/*NEW Search End here*/