/* NyahVolt Essentials UI v1.0
 * Search • Calendar • Help
 * Companion styling only: no MyBB core or template edits.
 */

body.nvessentials-body {
    --nvess-accent: #29c8ff;
    --nvess-secondary: #a65cff;
    --nvess-radius: 16px;
    --nvess-calendar-height: 112px;
    --nvess-bg: #040d1a;
    --nvess-panel: rgba(7, 26, 45, .98);
    --nvess-panel-deep: rgba(4, 14, 27, .99);
    --nvess-text: #eef8ff;
    --nvess-muted: #8ca7bd;
    --nvess-border: rgba(56, 197, 255, .24);
    --nvess-border-soft: rgba(255, 255, 255, .065);
    --nvess-shadow: 0 18px 42px rgba(0, 0, 0, .28);
}

/* ---------------------------------------------------------
   Shared hero
   --------------------------------------------------------- */
body.nvessentials-body .nvessentials-hero {
    position: relative;
    display: grid;
    overflow: hidden;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 18px;
    padding: 24px 26px;
    border: 1px solid rgba(56, 197, 255, .34);
    border-radius: 18px;
    background:
        radial-gradient(circle at 10% 8%, rgba(0, 190, 255, .20), transparent 32%),
        radial-gradient(circle at 92% 8%, rgba(163, 76, 255, .18), transparent 32%),
        linear-gradient(135deg, rgba(8, 32, 53, .99), rgba(4, 13, 26, .995));
    box-shadow: 0 20px 44px rgba(0, 0, 0, .28), inset 0 1px rgba(255, 255, 255, .05);
    color: var(--nvess-text);
}

body.nvessentials-body .nvessentials-hero::after {
    position: absolute;
    right: -60px;
    bottom: -95px;
    width: 230px;
    height: 230px;
    border: 1px solid rgba(88, 216, 255, .10);
    border-radius: 50%;
    box-shadow: 0 0 70px rgba(89, 55, 196, .16);
    content: "";
    pointer-events: none;
}

body.nvessentials-body .nvessentials-hero-icon {
    position: relative;
    z-index: 1;
    display: grid;
    width: 62px;
    height: 62px;
    place-items: center;
    border: 1px solid rgba(92, 219, 255, .32);
    border-radius: 17px;
    background: linear-gradient(145deg, rgba(0, 177, 255, .13), rgba(153, 73, 255, .14));
    box-shadow: inset 0 1px rgba(255, 255, 255, .06), 0 12px 26px rgba(0, 0, 0, .25);
}

body.nvessentials-body .nvessentials-hero-icon svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: var(--nvess-accent);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 10px rgba(41, 200, 255, .28));
}

body.nvessentials-body .nvessentials-hero-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
}

body.nvessentials-body .nvessentials-hero-copy small {
    display: block;
    color: #69dcff;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .16em;
}

body.nvessentials-body .nvessentials-hero-copy h1 {
    margin: 5px 0 7px;
    color: #fff;
    font-size: clamp(26px, 4vw, 43px);
    line-height: 1.03;
}

body.nvessentials-body .nvessentials-hero-copy p {
    max-width: 760px;
    margin: 0;
    color: #a7bed2;
    font-size: 12px;
    line-height: 1.65;
}

body.nvessentials-body .nvessentials-hero-links {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    max-width: 310px;
}

body.nvessentials-body .nvessentials-hero-links a {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0 14px;
    border: 1px solid rgba(73, 211, 255, .35);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(8, 116, 179, .84), rgba(55, 30, 112, .84));
    color: #fff !important;
    font-size: 10px;
    font-weight: 900;
    text-decoration: none !important;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

body.nvessentials-body .nvessentials-hero-links a:hover {
    transform: translateY(-1px);
    border-color: rgba(99, 225, 255, .75);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .22), 0 0 0 1px rgba(41, 200, 255, .10);
}

/* ---------------------------------------------------------
   Shared tables, panels and form controls
   --------------------------------------------------------- */
body.nvessentials-body table.nvessentials-panel-table {
    width: 100% !important;
    overflow: hidden;
    box-sizing: border-box;
    margin: 0 0 16px !important;
    border: 1px solid var(--nvess-border) !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-radius: var(--nvess-radius) !important;
    background: linear-gradient(145deg, var(--nvess-panel), var(--nvess-panel-deep)) !important;
    box-shadow: var(--nvess-shadow), inset 0 1px rgba(255, 255, 255, .035) !important;
    color: var(--nvess-text) !important;
}

body.nvessentials-body table.nvessentials-panel-table .thead,
body.nvessentials-body table.nvessentials-panel-table th.thead,
body.nvessentials-body table.nvessentials-panel-table td.thead {
    padding: 15px 17px !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(70, 199, 255, .19) !important;
    background:
        linear-gradient(90deg, rgba(0, 150, 226, .18), rgba(130, 65, 219, .12)),
        rgba(5, 22, 38, .96) !important;
    color: #f5fbff !important;
    font-size: 13px !important;
    font-weight: 900 !important;
}

body.nvessentials-body table.nvessentials-panel-table .thead a {
    color: #f5fbff !important;
}

body.nvessentials-body table.nvessentials-panel-table .tcat,
body.nvessentials-body table.nvessentials-panel-table th.tcat,
body.nvessentials-body table.nvessentials-panel-table td.tcat {
    padding: 10px 13px !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, .06) !important;
    background: rgba(7, 27, 45, .93) !important;
    color: #94b2ca !important;
    font-size: 9px !important;
    font-weight: 900 !important;
    letter-spacing: .045em;
    text-transform: uppercase;
}

body.nvessentials-body table.nvessentials-panel-table .tcat a {
    color: #cfeeff !important;
    text-decoration: none !important;
}

body.nvessentials-body table.nvessentials-panel-table .trow1,
body.nvessentials-body table.nvessentials-panel-table .trow2,
body.nvessentials-body table.nvessentials-panel-table .trow_sep {
    border-color: rgba(255, 255, 255, .055) !important;
    background: rgba(255, 255, 255, .018) !important;
    color: #dfefff !important;
}

body.nvessentials-body table.nvessentials-panel-table .trow2 {
    background: rgba(255, 255, 255, .032) !important;
}

body.nvessentials-body table.nvessentials-panel-table td,
body.nvessentials-body table.nvessentials-panel-table th {
    box-sizing: border-box;
}

body.nvessentials-body table.nvessentials-panel-table a {
    color: #8bdfff;
}

body.nvessentials-body table.nvessentials-panel-table a:hover {
    color: #fff;
}

body.nvessentials-body .smalltext {
    color: #88a4bb;
}

body.nvessentials-body input.textbox,
body.nvessentials-body input[type="text"],
body.nvessentials-body input[type="search"],
body.nvessentials-body input[type="email"],
body.nvessentials-body input[type="number"],
body.nvessentials-body input[type="date"],
body.nvessentials-body select,
body.nvessentials-body textarea {
    min-height: 38px;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid rgba(71, 196, 255, .24) !important;
    border-radius: 9px !important;
    outline: 0;
    background: rgba(2, 12, 24, .82) !important;
    color: #ecf8ff !important;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, .32);
}

body.nvessentials-body textarea {
    min-height: 110px;
    resize: vertical;
}

body.nvessentials-body input.textbox:focus,
body.nvessentials-body input[type="text"]:focus,
body.nvessentials-body input[type="search"]:focus,
body.nvessentials-body select:focus,
body.nvessentials-body textarea:focus {
    border-color: rgba(77, 217, 255, .72) !important;
    box-shadow: 0 0 0 3px rgba(41, 200, 255, .08), inset 0 1px 4px rgba(0, 0, 0, .32);
}

body.nvessentials-body input.button,
body.nvessentials-body button,
body.nvessentials-body .button {
    min-height: 38px;
    box-sizing: border-box;
    padding: 0 15px !important;
    border: 1px solid rgba(73, 211, 255, .38) !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, rgba(8, 116, 179, .96), rgba(55, 30, 112, .96)) !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease;
}

body.nvessentials-body input.button:hover,
body.nvessentials-body button:hover,
body.nvessentials-body .button:hover {
    transform: translateY(-1px);
    border-color: rgba(102, 226, 255, .78) !important;
}

body.nvessentials-body fieldset {
    margin: 12px 0;
    padding: 14px;
    border: 1px solid rgba(58, 192, 255, .17) !important;
    border-radius: 12px;
    background: rgba(255, 255, 255, .018);
}

body.nvessentials-body legend {
    padding: 0 7px;
    color: #dff4ff;
    font-size: 10px;
    font-weight: 900;
}

body.nvessentials-body .pagination a,
body.nvessentials-body .pagination .pagination_current,
body.nvessentials-body .pagination .pagination_page {
    border-color: rgba(55, 198, 255, .20) !important;
    border-radius: 8px !important;
    background: rgba(0, 163, 255, .06) !important;
    color: #b9d9ee !important;
}

body.nvessentials-body .pagination .pagination_current {
    background: linear-gradient(135deg, rgba(0, 151, 225, .34), rgba(125, 63, 201, .30)) !important;
    color: #fff !important;
}

/* ---------------------------------------------------------
   Search page and result cards
   --------------------------------------------------------- */
body.nvessentials-search table.nvessentials-search-form-table td {
    padding: 12px 14px !important;
}

body.nvessentials-search table.nvessentials-search-results-table {
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.nvessentials-search table.nvessentials-search-results-table > tbody {
    display: grid;
    gap: 12px;
}

body.nvessentials-search table.nvessentials-search-results-table tr.nvessentials-hidden-row {
    display: none !important;
}

body.nvessentials-search table.nvessentials-search-results-table tr.nvessentials-result-card {
    display: grid;
    min-width: 0;
    grid-template-columns: 24px 30px minmax(220px, 1fr) repeat(5, minmax(72px, 108px));
    gap: 11px;
    align-items: center;
    box-sizing: border-box;
    padding: 14px;
    border: 1px solid var(--nvess-border);
    border-radius: var(--nvess-radius);
    background:
        radial-gradient(circle at 5% 0%, rgba(0, 183, 255, .085), transparent 28%),
        linear-gradient(145deg, rgba(9, 34, 57, .98), rgba(4, 15, 29, .995));
    box-shadow: 0 13px 30px rgba(0, 0, 0, .24), inset 0 1px rgba(255, 255, 255, .03);
    color: var(--nvess-text);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

body.nvessentials-search table.nvessentials-search-results-table tr.nvessentials-result-card:hover {
    transform: translateY(-2px);
    border-color: rgba(70, 211, 255, .53);
    box-shadow: 0 17px 36px rgba(0, 0, 0, .30), 0 0 0 1px rgba(41, 200, 255, .07);
}

body.nvessentials-search table.nvessentials-search-results-table tr.nvessentials-result-card > td {
    display: block;
    min-width: 0;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #dceeff;
    text-align: left !important;
    vertical-align: middle !important;
}

body.nvessentials-search td.nvessentials-result-status,
body.nvessentials-search td.nvessentials-result-icon {
    display: grid !important;
    place-items: center;
}

body.nvessentials-search td.nvessentials-result-content {
    min-width: 0;
}

body.nvessentials-search td.nvessentials-result-content a {
    color: #f1faff !important;
    font-weight: 900;
    text-decoration: none !important;
}

body.nvessentials-search td.nvessentials-result-content a:hover {
    color: var(--nvess-accent) !important;
}

body.nvessentials-search td.nvessentials-result-content .smalltext,
body.nvessentials-search td.nvessentials-result-content em {
    color: #8ca6bb !important;
    font-size: 10px;
    line-height: 1.55;
}

body.nvessentials-search td.nvessentials-result-content table {
    margin-top: 6px;
    border: 0 !important;
    background: transparent !important;
}

body.nvessentials-search td.nvessentials-result-meta {
    overflow: hidden;
    padding: 8px 9px !important;
    border: 1px solid rgba(255, 255, 255, .055) !important;
    border-radius: 10px;
    background: rgba(255, 255, 255, .022) !important;
    color: #dceeff !important;
    font-size: 10px;
    font-weight: 800;
    text-align: center !important;
    text-overflow: ellipsis;
}

body.nvessentials-search td.nvessentials-result-meta::before {
    display: block;
    overflow: hidden;
    margin-bottom: 4px;
    color: #6f91ad;
    content: attr(data-label);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .07em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

body.nvessentials-search .thread_status {
    opacity: .78;
    transform: scale(.82);
}

/* ---------------------------------------------------------
   Calendar
   --------------------------------------------------------- */
body.nvessentials-calendar .nvessentials-calendar-scroll {
    width: 100%;
    overflow-x: auto;
    margin: 0 0 16px;
    padding: 2px 2px 7px;
    scrollbar-color: rgba(70, 204, 255, .55) rgba(255, 255, 255, .04);
    scrollbar-width: thin;
}

body.nvessentials-calendar .nvessentials-calendar-scroll > table {
    min-width: 820px;
    margin-bottom: 0 !important;
}

body.nvessentials-calendar table.nvessentials-calendar-month-table {
    table-layout: fixed;
}

body.nvessentials-calendar table.nvessentials-calendar-month-table td.nvessentials-calendar-day {
    position: relative;
    min-width: 100px;
    height: var(--nvess-calendar-height) !important;
    padding: 10px !important;
    border-right: 1px solid rgba(255, 255, 255, .045) !important;
    border-bottom: 1px solid rgba(255, 255, 255, .045) !important;
    background: rgba(255, 255, 255, .018) !important;
    vertical-align: top !important;
    transition: background .18s ease, box-shadow .18s ease;
}

body.nvessentials-calendar table.nvessentials-calendar-month-table td.nvessentials-calendar-day:hover {
    background: rgba(0, 170, 255, .055) !important;
    box-shadow: inset 0 0 0 1px rgba(45, 202, 255, .14);
}

body.nvessentials-calendar table.nvessentials-calendar-month-table td.trow2.nvessentials-calendar-day {
    background: rgba(255, 255, 255, .032) !important;
}

body.nvessentials-calendar table.nvessentials-calendar-month-table td.trow_sep.nvessentials-calendar-day {
    background:
        radial-gradient(circle at 80% 5%, rgba(158, 75, 255, .16), transparent 36%),
        rgba(0, 157, 235, .11) !important;
    box-shadow: inset 0 0 0 1px rgba(76, 213, 255, .38);
}

body.nvessentials-calendar a.nvessentials-day-number {
    display: inline-flex;
    min-width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0 7px;
    border: 1px solid rgba(67, 201, 255, .18);
    border-radius: 8px;
    background: rgba(0, 163, 255, .075);
    color: #dff5ff !important;
    font-size: 10px;
    font-weight: 900;
    text-decoration: none !important;
}

body.nvessentials-calendar a.nvessentials-event-chip {
    display: block;
    overflow: hidden;
    margin: 6px 0 0;
    padding: 6px 7px;
    border: 1px solid rgba(111, 204, 255, .15);
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(0, 155, 229, .10), rgba(124, 61, 198, .08));
    color: #cdeeff !important;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none !important;
}

body.nvessentials-calendar a.nvessentials-event-chip:hover {
    border-color: rgba(79, 216, 255, .45);
    background: linear-gradient(90deg, rgba(0, 155, 229, .18), rgba(124, 61, 198, .15));
    color: #fff !important;
}

body.nvessentials-calendar table.nvessentials-calendar-table td {
    line-height: 1.55;
}

body.nvessentials-calendar table.nvessentials-calendar-table .largetext {
    color: #fff;
}

body.nvessentials-calendar table.nvessentials-calendar-table img.userstar {
    max-height: 18px;
}

body.nvessentials-calendar .nvessentials-calendar-form-table td {
    padding: 12px 14px !important;
}

/* ---------------------------------------------------------
   Help Center
   --------------------------------------------------------- */
body.nvessentials-help table.nvessentials-help-section-table {
    overflow: visible !important;
    margin-bottom: 15px !important;
}

body.nvessentials-help table.nvessentials-help-section-table > tbody {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
}

body.nvessentials-help table.nvessentials-help-section-table > tbody[style*="display: none"] {
    display: none;
}

body.nvessentials-help table.nvessentials-help-section-table tr.nvessentials-help-description-row {
    display: block;
    grid-column: 1 / -1;
}

body.nvessentials-help table.nvessentials-help-section-table tr.nvessentials-help-description-row > td {
    display: block;
    padding: 4px 3px 10px !important;
    border: 0 !important;
    background: transparent !important;
    color: #829db4 !important;
    font-size: 10px !important;
    letter-spacing: 0;
    text-transform: none;
}

body.nvessentials-help table.nvessentials-help-section-table tr.nvessentials-help-item-row {
    display: block;
}

body.nvessentials-help table.nvessentials-help-section-table tr.nvessentials-help-item-row > td {
    display: block;
    min-height: 82px;
    box-sizing: border-box;
    padding: 13px !important;
    border: 1px solid rgba(255, 255, 255, .06) !important;
    border-radius: 12px;
    background: rgba(255, 255, 255, .024) !important;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

body.nvessentials-help table.nvessentials-help-section-table tr.nvessentials-help-item-row > td:hover {
    transform: translateY(-1px);
    border-color: rgba(67, 209, 255, .36) !important;
    background: rgba(0, 166, 255, .045) !important;
}

body.nvessentials-help table.nvessentials-help-section-table tr.nvessentials-help-item-row strong a {
    color: #f0f9ff !important;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none !important;
}

body.nvessentials-help table.nvessentials-help-section-table tr.nvessentials-help-item-row strong a:hover {
    color: var(--nvess-accent) !important;
}

body.nvessentials-help table.nvessentials-help-section-table tr.nvessentials-help-item-row .smalltext {
    display: block;
    margin-top: 6px;
    color: #819db5 !important;
    font-size: 10px;
    line-height: 1.55;
}

body.nvessentials-help table.nvessentials-help-search-table td {
    padding: 15px !important;
}

body.nvessentials-help table.nvessentials-help-search-table form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    align-items: center;
}

body.nvessentials-help table.nvessentials-help-search-table form > div {
    float: none !important;
    padding: 0 !important;
}

body.nvessentials-help table.nvessentials-help-search-table input[type="text"] {
    width: min(440px, 75vw);
}

body.nvessentials-help table.nvessentials-help-article-table .scaleimages {
    padding: 20px !important;
    color: #d5e8f5 !important;
    font-size: 12px;
    line-height: 1.75;
}

body.nvessentials-help table.nvessentials-help-article-table .scaleimages h1,
body.nvessentials-help table.nvessentials-help-article-table .scaleimages h2,
body.nvessentials-help table.nvessentials-help-article-table .scaleimages h3,
body.nvessentials-help table.nvessentials-help-article-table .scaleimages strong {
    color: #fff;
}

body.nvessentials-help table.nvessentials-help-results-table tr.nvessentials-help-result-row > td {
    display: block;
    margin: 9px 11px;
    padding: 13px !important;
    border: 1px solid rgba(255, 255, 255, .06) !important;
    border-radius: 11px;
    background: rgba(255, 255, 255, .024) !important;
}

body.nvessentials-help .expcolimage img {
    opacity: .85;
    filter: drop-shadow(0 0 7px rgba(41, 200, 255, .22));
}

/* ---------------------------------------------------------
   Responsive adjustments
   --------------------------------------------------------- */
@media (max-width: 1100px) {
    body.nvessentials-search table.nvessentials-search-results-table tr.nvessentials-result-card {
        grid-template-columns: 24px 30px minmax(180px, 1fr) repeat(3, minmax(72px, 95px));
    }

    body.nvessentials-search td.nvessentials-result-meta:nth-of-type(n+7) {
        display: none;
    }
}

@media (max-width: 780px) {
    body.nvessentials-body .nvessentials-hero {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 14px;
        padding: 20px;
    }

    body.nvessentials-body .nvessentials-hero-icon {
        width: 52px;
        height: 52px;
        border-radius: 14px;
    }

    body.nvessentials-body .nvessentials-hero-icon svg {
        width: 29px;
        height: 29px;
    }

    body.nvessentials-body .nvessentials-hero-links {
        grid-column: 1 / -1;
        justify-content: flex-start;
        max-width: none;
    }

    body.nvessentials-body .nvessentials-hero-links a {
        min-height: 34px;
        padding: 0 12px;
        font-size: 9px;
    }

    body.nvessentials-search table.nvessentials-search-results-table tr.nvessentials-result-card {
        grid-template-columns: 24px 30px repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    body.nvessentials-search td.nvessentials-result-content {
        grid-column: 3 / -1;
    }

    body.nvessentials-search td.nvessentials-result-meta {
        display: block !important;
        grid-column: span 1;
    }

    body.nvessentials-search td.nvessentials-result-meta:nth-of-type(n+7) {
        display: none !important;
    }

    body.nvessentials-help table.nvessentials-help-section-table > tbody {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    body.nvessentials-body .nvessentials-hero {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    body.nvessentials-body .nvessentials-hero-icon {
        display: none;
    }

    body.nvessentials-body .nvessentials-hero-copy h1 {
        font-size: 27px;
    }

    body.nvessentials-search table.nvessentials-search-results-table tr.nvessentials-result-card {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.nvessentials-search td.nvessentials-result-status,
    body.nvessentials-search td.nvessentials-result-icon {
        display: none !important;
    }

    body.nvessentials-search td.nvessentials-result-content {
        grid-column: 1 / -1;
    }

    body.nvessentials-help table.nvessentials-help-search-table form {
        display: grid;
        grid-template-columns: 1fr;
    }

    body.nvessentials-help table.nvessentials-help-search-table input[type="text"] {
        width: 100%;
    }
}
