/*
 * jayde.com stylesheet. Same look as the 2011 design (style/style.css on the
 * legacy site): 994px page, 613px content + 336px sidebar, the green
 * header image and colours. Above 1010px it matches the old layout; below
 * that the columns stack and the header reflows for phones.
 */

:root {
    --green: #006633;
    --green-dark: #006940;
    --green-light: #F0F8EC;
    --green-pale: #EFF8EC;
    --green-border: #B3CAAD;
    --link: #0000CC;
    --link-visited: #551A8B;
    --text: #333;
    --muted: #898994;
    --url: #568E1A;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    padding-bottom: 25px;
    color: var(--text);
    background: #FFF;
    font-family: Arial, Helvetica, Verdana, sans-serif;
}
a { color: var(--link); text-decoration: none; }
a:visited { color: var(--link); }
a:hover { color: var(--link-visited); text-decoration: underline; }
img { border: 0; max-width: 100%; height: auto; }
p, blockquote, ul, ol { margin: 15px 0; padding: 0; }
li { margin: 3px 0 3px 15px; padding: 2px 3px; }
h1, h2, h3, h4 { margin: 0 0 15px; padding: 0; }
h1 { font-size: 26px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 14px; }
hr { margin: 15px 0; border: 0; border-top: 1px solid #CCC; }
.clear { clear: both; }
.visually-hidden {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- page frame ---------- */
.container {
    margin: 0 auto;
    max-width: 994px;
    font-size: 12px;
}
.top-ad {
    margin: 0 auto 25px;
    max-width: 750px;
    min-height: 90px;
    text-align: center;
    overflow: hidden;
}

/* ---------- header ---------- */
.header {
    position: relative;
    height: 75px;
    padding: 10px;
    background: url(header-bg.jpg) no-repeat left top;
}
#logo {
    display: block;
    float: left;
    width: 188px;
    height: 55px;
    margin-right: 25px;
    overflow: hidden;
    text-indent: -99999px;
    background: url(jayde.png) no-repeat left top;
}
/* "Get Listed on Jayde!" (was a sprite image with a "Sign In" button) */
.get-listed, .get-listed:visited {
    float: left;
    margin: 5px 0 0 25px;
    padding: 4px 10px 4px 8px;
    border: 1px solid #D5E5CC;
    border-radius: 3px;
    background: #FFF;
    color: var(--green);
    font-size: 12px;
    font-weight: bold;
    line-height: 1.25;
}
.get-listed em { color: #C00; font-style: normal; }
.get-listed small { display: block; font-size: 10px; color: var(--green); }
.get-listed:hover { color: var(--green); text-decoration: none; border-color: var(--green); }
#header-links {
    position: absolute;
    top: 0;
    right: 0;
    margin: 8px 5px 0 0;
    padding: 0;
    list-style: none;
}
#header-links li { display: inline; margin: 0; padding: 0 5px; font-size: 11px; }
#header-links a, #header-links a:visited { color: var(--text); }
#jayde-submit {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 4px;
    width: 300px;
    margin: 42px 10px 0 0;
}
.searchinput {
    flex: 1;
    width: 225px;
    min-width: 0;
    padding: 1px 3px;
    border: 1px solid var(--green);
    font: inherit;
    font-size: 13px;
}
.searchbutton {
    padding: 1px 8px;
    border: 0;
    cursor: pointer;
    color: var(--green);
    background: var(--green-light);
    font: inherit;
    font-size: 13px;
}

/* ---------- columns ---------- */
.content { margin: 25px 0; padding: 0 10px; }
.content::after { content: ""; display: block; clear: both; }
.columns { display: flex; gap: 25px; align-items: flex-start; }
.content-left { flex: 0 1 613px; min-width: 0; }
.content-right { flex: 0 0 336px; }
.sidebar-block { margin-bottom: 15px; }

/* sidebar category box */
.cat-box { width: 100%; max-width: 336px; }
.cat-box h2 {
    margin: 0;
    padding: 5px;
    color: #FFF;
    background: #006733;
    font-size: 16px;
}
.cat-box ul {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    margin: 0;
    padding: 5px;
    list-style: none;
    background: var(--green-pale);
}
.cat-box li { margin: 0; padding: 3px; font-weight: bold; }

/* ---------- home page ---------- */
#featured-list { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0; list-style: none; }
#featured-list li { margin: 0; padding: 10px; min-height: 54px; overflow: hidden; }
#featured-list li strong { font-size: 16px; }
#featured-list a, #featured-list a:visited { color: var(--green); }
#featured-list small { display: block; font-size: 10px; }
.sub-content { display: flex; gap: 20px; margin-bottom: 25px; padding: 0 10px; }
.sub-content-left {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    background: var(--green-light);
}
.sub-content-left strong { font-size: 18px; }
.sub-content-right { flex: 0 0 336px; min-height: 280px; }

/* ---------- directory: categories, subcategories, listings ---------- */
.breadcrumb { margin: -10px 0 15px; }
#all-cats-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(266px, 1fr)); margin: 0; padding: 0; list-style: none; }
#all-cats-list li { margin: 0; padding: 5px 10px; }
#all-cats-list li strong { font-size: 16px; }
#all-cats-list a, #all-cats-list a:visited { color: var(--green); }
#sub-categories { display: grid; grid-template-columns: repeat(auto-fill, minmax(183px, 1fr)); padding: 0; list-style: none; }
#sub-categories li { margin: 3px 0; padding: 2px 3px 2px 12px; position: relative; }
#sub-categories li::before { content: "•"; position: absolute; left: 0; }
#sub-categories a, #sub-categories a:visited { color: var(--green); font-weight: bold; }

.results-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 25px; }
.results-head h2 { margin: 0; font-size: 12px; }
.results-amount { color: var(--muted); }
.all-results { color: var(--muted); }
.more-listings { color: var(--green-dark); font-size: 14px; font-weight: bold; }
.listings-split { margin: 30px 0; }

.listings { margin: 20px 0 0; padding: 0; list-style: none; }
.listing { margin: 0 0 15px; }
.listing-site-title, a.listing-site-title, a.listing-site-title:hover {
    color: #0033CC;
    font-size: 16px;
    text-decoration: underline;
}
a.listing-site-title:visited { color: var(--link-visited); }
.listing p { margin: 2px 0; }
.listing-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.listing-site-url, a.listing-site-url, a.listing-site-url:hover, a.listing-site-url:visited { color: var(--url); text-decoration: none; overflow-wrap: anywhere; }
.edit-listing, a.edit-listing { font-style: italic; }
.site-tags { display: block; margin: 5px 0 0 20px; padding: 0 5px; }
.site-tags a, .site-tags a:visited { margin-left: 5px; color: #999; }
.site-tags a:hover { color: #999; text-decoration: underline; }

.pagination { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 25px 0; padding: 0; list-style: none; }
.pagination li { margin: 0; padding: 0; }
.pagination a, .pagination span {
    display: block;
    min-width: 25px;
    padding: 4px 4px 3px;
    text-align: center;
    border: 1px solid var(--green-border);
}
.pagination a:hover, .pagination [aria-current] { border-color: #2C6B41; background: #CEDBCD; text-decoration: none; }
.pagination .prev-next { min-width: 52px; }

/* ---------- profile ---------- */
.company-info { width: 100%; border: 1px solid #EEE; border-collapse: collapse; background: #F7F7F7; }
.company-info-header { color: #FFF; background: var(--green); }
.company-info-header a, .company-info-header a:visited { color: #FFF; text-decoration: underline; }
.company-info td, .company-info th { padding: 5px; text-align: left; vertical-align: top; }
.company-info-section { width: 100px; font-weight: bold; border-right: 1px solid #EEE; }
.company-info .alt-row { background: #FFF; }
.profile-edit-listing { float: right; }

/* ---------- forms and notices ---------- */
.welcome-box { margin-bottom: 20px; padding: 5px 10px; background: #EEE; border: 1px solid #CCC; }
.welcome-box span { font-size: 14px; }
.form-box { margin-bottom: 20px; padding: 10px; background: #EEE; border: 1px dashed #CCC; }
.form-row { display: grid; grid-template-columns: 200px 1fr; gap: 4px 10px; padding: 5px 0; border-top: 1px solid #DEDEDE; }
.form-row:first-child { border-top: 0; }
.form-row label { font-weight: bold; }
.form-row input[type=text], .form-row input[type=email], .form-row input[type=url], .form-row select, .form-row textarea {
    width: 100%;
    max-width: 380px;
    padding: 3px;
    font: inherit;
}
.form-row textarea { max-width: none; min-height: 120px; }
.form-hint { color: #787878; font-size: 11px; }
.form-errors { color: #C00; font-weight: bold; }
.honeypot { position: absolute; left: -10000px; }
.button, button.button {
    padding: 6px 14px;
    border: 0;
    border-radius: 5px;
    cursor: pointer;
    color: #FFF;
    background: var(--green);
    font: inherit;
    font-size: 14px;
    font-weight: bold;
}
.button:hover { color: #FFF; background: var(--green-dark); text-decoration: none; }
.notice { margin: 10px 0; padding: 15px; border: 1px dashed var(--green-dark); background: #FFF; }
.notice-title { display: block; color: var(--green-dark); font-size: 22px; font-weight: bold; }
.notice-error { border-color: #C00; }
.notice-error .notice-title { color: #C00; }
.page-title-img { display: block; margin-bottom: 15px; }
.indent { margin-left: 25px; }

/* ---------- footer ---------- */
.footer-links {
    margin: 0 0 10px;
    padding: 3px 10px;
    border-radius: 10px;
    color: #FFF;
    background: var(--green);
    font-size: 12px;
}
.footer-links a, .footer-links a:visited, .footer-links a:hover { color: #FFF; }
.footer { margin-bottom: 25px; font-size: 11px; text-align: center; }
.footer a, .footer a:visited, .footer a:hover { color: var(--text); text-decoration: underline; }

/* ---------- ads ---------- */
.ad { overflow: hidden; }
.ad-rectangle { width: 336px; max-width: 100%; min-height: 280px; }

/* ---------- narrower screens ---------- */
@media (max-width: 1009px) {
    .container { padding: 0 8px; }
    /* the header image is a fixed 994px; rebuild it with CSS */
    .header {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px 15px;
        height: auto;
        padding: 10px 10px 0;
        border-bottom: 6px solid var(--green);
        border-radius: 0 0 4px 4px;
        background: linear-gradient(to right, #FFF, #EEF6E8);
    }
    #logo { float: none; margin: 0; }
    .get-listed { float: none; margin: 0; }
    #header-links { position: static; order: 3; margin: 0 0 0 auto; }
    #jayde-submit {
        position: static;
        order: 4;
        flex: 1 0 100%;
        width: auto;
        margin: 0 -10px;
        padding: 6px 10px;
        border-radius: 8px 8px 0 0;
        background: var(--green);
    }
    .searchinput { width: auto; padding: 5px; font-size: 16px; }
    .searchbutton { padding: 5px 12px; font-size: 16px; }
    .content { padding: 0; }
    #featured-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .columns, .sub-content { flex-direction: column; align-items: stretch; }
    .content-left, .content-right, .sub-content-right { flex: none; width: 100%; }
    .content-right .cat-box { max-width: none; }
    .content-right .ad-rectangle { margin: 0 auto; }
    .sub-content { padding: 0; }
    .sub-content-right { display: flex; justify-content: center; }
}
@media (max-width: 640px) {
    .top-ad { min-height: 0; margin-bottom: 15px; }
    #header-links { flex: 1 0 100%; order: 2; margin: 0; padding: 0; }
    #header-links li:first-child { padding-left: 0; }
    #featured-list { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .company-info, .company-info tbody, .company-info tr, .company-info td, .company-info th { display: block; width: auto; }
    .company-info-section { border-right: 0; padding-bottom: 0; }
    .footer-links { display: flex; flex-wrap: wrap; gap: 4px 10px; }
}

/* ---------- small page bits ---------- */
.notice-thanks { border-color: #C00; background: #FFF url(/images/thank-u-box.jpg) no-repeat right 55px; }
.notice-thanks .notice-title { color: #C00; font-size: 24px; }
.notice-thanks em { font-size: 18px; }
.highlight, .required { color: #C00; }
@media (max-width: 640px) {
    .notice-thanks { background-image: none; }
}

/* ---------- main.html and categories.html ---------- */
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.folder-grid li { margin: 0; padding: 0 0 0 28px; min-height: 40px; background: url(/images/cat-folder.gif) no-repeat 0 0; }
.folder-grid small { display: block; font-size: 10px; color: var(--text); }
.category-tree { columns: 2 260px; column-gap: 25px; }
.category-tree section { break-inside: avoid; margin-bottom: 12px; }
.category-tree h2 { margin: 0 0 3px; font-size: 13px; }
.category-tree ul { margin: 0; padding: 0; list-style: none; }
.category-tree li { margin: 0; padding: 1px 0 1px 12px; }

/* ---------- profile and listing pages ---------- */
.section-label { margin: 0; font-size: 12px; }
.site-heading { overflow-wrap: anywhere; }
.site-facts { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; margin: 0 0 20px; }
.site-facts dt { font-weight: bold; }
.site-facts dd { margin: 0; overflow-wrap: anywhere; }
.site-facts .site-tags { margin: 0; padding: 0; }
.site-facts .site-tags a:first-child { margin-left: 0; }
.ad-banner-wrap { display: flex; justify-content: center; margin-top: 20px; }
.company-info td { overflow-wrap: anywhere; }
@media (max-width: 640px) {
    .site-facts { grid-template-columns: 1fr; gap: 2px; }
    .site-facts dd { margin-bottom: 6px; }
}

/* ---------- forms ---------- */
.email-warning { margin: 10px 0; padding: 4px 6px; color: #C00; background: #E2E2E2; font-size: 11px; text-align: center; }
.optional-info { margin-top: 10px; padding: 8px 10px; background: var(--green-dark); border-radius: 4px; }
.optional-info > summary, .optional-info > p { color: #FFF; cursor: pointer; }
.optional-info > p { cursor: auto; margin: 6px 0; }
.optional-info[open] { padding-bottom: 4px; }
.optional-info .form-row { margin: 0 -10px; padding: 5px 10px; background: #EEE; }
.optional-info .form-row:first-of-type { border-top: 0; }
.form-actions { margin: 12px 0 0; text-align: right; }
.button-secondary, button.button-secondary { color: var(--text); background: #DDD; }
.button-secondary:hover { color: var(--text); background: #CCC; }
.form-errors ul { margin: 6px 0 0; }
.footer-links-submit { margin-top: 15px; }

/* ---------- listing editor ---------- */
.step-title { margin: 20px 0 8px; font-size: 16px; color: var(--green); }
.verify-options li { margin: 0 0 12px 20px; }
code { padding: 1px 4px; background: #F3F3F3; border: 1px solid #E2E2E2; font-size: 12px; overflow-wrap: anywhere; }
.form-actions-left { text-align: left; }
#edit-listing-form .step-title:first-of-type { margin-top: 0; }
