/* ---------------------------------------------------------
   ADVANCED SEARCH
--------------------------------------------------------- */

.advanced-search {
    margin-bottom: 30px;
}

.advanced-search-form {
    display: flex;
    width: 100%;
    max-width: 650px;
    margin: 0;
}

.advanced-search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    height: 36px;
    padding: 0 11px;

    border: 1px solid #555;
    border-radius: 5px;

    background: #1c1c1c;
    color: #eee;

    font-family: inherit;
    font-size: 14px;

    outline: none;

    transition:
        border-color 0.15s ease,
        background-color 0.15s ease;
}

.advanced-search-form input[type="text"]:focus {
    border-color: #777;
    background: #202020;
}

.advanced-search-form input[type="text"]::placeholder {
    color: #999;
}

.advanced-search-form button {
    height: 36px;
    margin-left: 7px;
    padding: 0 17px;

    border: 1px solid #555;
    border-radius: 5px;

    background: #2b2b2b;
    color: #eee;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.advanced-search-form button:hover {
    background: #1AA260;
    border-color: #1AA260;
    color: #fff;
}


/* ---------------------------------------------------------
   SEARCH TYPES
--------------------------------------------------------- */

.advanced-search-types {
    display: flex;
    gap: 6px;

    margin-top: 10px;
}

.advanced-search-types a {
    display: inline-flex;
    align-items: center;

    padding: 5px 10px;

    border: 1px solid #444;
    border-radius: 5px;

    background: #252525;
    color: #aaa;

    font-size: 12px;
    font-weight: 500;
    line-height: 1;

    text-decoration: none;
}

.advanced-search-types a:hover {
    border-color: #666;
    color: #eee;
    text-decoration: none;
}

.advanced-search-types a.active {
    border-color: #1AA260;
    background: #1AA260;
    color: #fff;
}


/* ---------------------------------------------------------
   RESULTS HEADER
--------------------------------------------------------- */

.advanced-search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-top: 24px;
    padding-bottom: 7px;

    border-bottom: 1px solid #444;
}

.advanced-search-results-header h2 {
    margin: 0;
    padding: 0;

    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.advanced-search-results-total {
    color: #999;

    font-size: 12px;
    font-weight: 400;
}


/* ---------------------------------------------------------
   RESULT LIST
--------------------------------------------------------- */

.advanced-search-list {
    width: 100%;
}

.advanced-search-result {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    width: 100%;
    padding: 14px 0 15px 0;
    box-sizing: border-box;

    border-bottom: 1px solid #333;
}


/* ---------------------------------------------------------
   BOOK COVER
--------------------------------------------------------- */

.advanced-search-cover {
    flex: 0 0 55px;
    width: 55px;
}

.advanced-search-cover a {
    display: block;
}

.advanced-search-cover img {
    display: block;

    width: 55px !important;
    max-width: 55px !important;
    height: auto !important;

    border-radius: 3px;
}


/* ---------------------------------------------------------
   RESULT CONTENT
--------------------------------------------------------- */

.advanced-search-content {
    flex: 1;
    min-width: 0;
}

.advanced-search-title {
    margin-bottom: 5px;

    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
}

.advanced-search-title a {
    text-decoration: none;
}

.advanced-search-title a:hover {
    text-decoration: underline;
}

.advanced-search-snippet {
    color: #ccc;

    font-size: 13px;
    line-height: 1.55;
}


/* ---------------------------------------------------------
   RESULT TYPE
--------------------------------------------------------- */

.advanced-search-type {
    display: inline-block;

    margin-left: 8px;
    padding: 2px 6px;

    border: 1px solid #555;
    border-radius: 4px;

    color: #999;

    font-size: 10px;
    font-weight: 500;
    line-height: 1.2;

    vertical-align: middle;
}


/* ---------------------------------------------------------
   SEARCH HIGHLIGHT
--------------------------------------------------------- */

.advanced-search-snippet mark {
    padding: 1px 2px;

    border-radius: 2px;

    background: #ffe58a;
    color: #222;

    font-weight: inherit;
}


/* ---------------------------------------------------------
   EMPTY SEARCH
--------------------------------------------------------- */

.advanced-search-empty {
    padding: 14px 0;

    color: #bbb;

    font-size: 13px;
    line-height: 1.5;
}


/* ---------------------------------------------------------
   LIGHT THEME
--------------------------------------------------------- */

.theme-light .advanced-search-form input[type="text"] {
    border-color: #ccc;
    background: #fff;
    color: #222;
}

.theme-light .advanced-search-form input[type="text"]:focus {
    border-color: #999;
    background: #fff;
}

.theme-light .advanced-search-form input[type="text"]::placeholder {
    color: #888;
}

.theme-light .advanced-search-form button {
    border-color: #ccc;
    background: #eee;
    color: #333;
}

.theme-light .advanced-search-form button:hover {
    border-color: #1AA260;
    background: #1AA260;
    color: #fff;
}

.theme-light .advanced-search-types a {
    border-color: #ccc;
    background: #f5f5f5;
    color: #666;
}

.theme-light .advanced-search-types a:hover {
    border-color: #999;
    color: #333;
}

.theme-light .advanced-search-types a.active {
    border-color: #1AA260;
    background: #1AA260;
    color: #fff;
}

.theme-light .advanced-search-results-header {
    border-bottom-color: #ccc;
}

.theme-light .advanced-search-results-total {
    color: #777;
}

.theme-light .advanced-search-result {
    border-bottom-color: #ddd;
}

.theme-light .advanced-search-snippet {
    color: #555;
}

.theme-light .advanced-search-type {
    border-color: #ccc;
    color: #777;
}

.theme-light .advanced-search-empty {
    color: #666;
}


/* ---------------------------------------------------------
   MOBILE
--------------------------------------------------------- */

@media (max-width: 600px) {

    .advanced-search-form input[type="text"] {
        height: 36px;
        font-size: 14px;
    }

    .advanced-search-form button {
        height: 36px;
        padding: 0 13px;
    }

    .advanced-search-types {
        gap: 4px;
        margin-top: 9px;
    }

    .advanced-search-types a {
        padding: 5px 9px;
        font-size: 12px;
    }

    .advanced-search-results-header {
        margin-top: 24px;
    }

    .advanced-search-results-header h2 {
        font-size: 17px;
    }

    .advanced-search-result {
        gap: 10px;

        padding: 12px 0 13px 0;
    }

    .advanced-search-cover {
        flex: 0 0 45px;
        width: 45px;
    }

    .advanced-search-cover img {
        width: 45px !important;
        max-width: 45px !important;
        height: auto !important;
    }

    .advanced-search-title {
        font-size: 14px;
    }

    .advanced-search-snippet {
        font-size: 13px;
        line-height: 1.5;
    }

    .advanced-search-type {
        margin-left: 6px;
        padding: 2px 5px;
        font-size: 9px;
    }
}
