/*
Theme Name: API Theme
Author: Victor Osorhan
Description: A simple WordPress theme designed for API access.
Version: 2.0.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: api-theme
*/

/* Default styles for non-logged in users or when plugin is not active */
body:not(.logged-in), 
body.logged-in:not(.documentation-plugin-active) {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f5f5f5;
}

/* Styles for logged-in users with active plugin */
body.logged-in.documentation-plugin-active {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: #f5f5f5;
    display: block;
}

.message {
    color: #333;
    text-align: center;
    padding: 20px;
    border: 1px solid #e5e5e5;
    background-color: #fff;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

/* Documentation archive styles for logged-in users */
.logged-in .documentation-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    gap: 2rem;
}

.logged-in .documentation-sidebar {
    flex: 0 0 300px;
    background: #fff;
    padding: 1.5rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.logged-in .documentation-content {
    flex: 1;
}

.logged-in .documentation-item {
    background: #fff;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.logged-in .documentation-item h2 {
    margin-top: 0;
    color: #333;
}

.logged-in .documentation-item a {
    color: #0073aa;
    text-decoration: none;
}

.logged-in .documentation-item a:hover {
    text-decoration: underline;
}

/* Pagination Styling */
.documentation-pagination {
    margin-top: 2rem;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.documentation-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.documentation-pagination .page-numbers.current {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.documentation-pagination .page-numbers:hover:not(.current) {
    background: #f5f5f5;
    border-color: #0073aa;
    color: #0073aa;
}

.documentation-pagination .next,
.documentation-pagination .prev {
    padding: 0 16px;
}

/* Single document styles for logged-in users */
.logged-in .single-documentation-container {
    position: relative;
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.logged-in .single-documentation {
    /* position: relative; */
    background: #fff;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.logged-in .single-documentation .entry-title {
    padding-right: 0px;
    margin-top: 0;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
    color: #333;
}

.logged-in .single-documentation .entry-content {
    line-height: 1.6;
    color: #444;
}

.logged-in .single-documentation .entry-content p {
    margin-bottom: 1.5rem;
}

.logged-in .documentation-navigation {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

.logged-in .documentation-navigation .nav-previous,
.logged-in .documentation-navigation .nav-next {
    max-width: 45%;
}

.logged-in .documentation-navigation .nav-subtitle {
    display: block;
    font-size: 0.8em;
    color: #666;
    margin-bottom: 0.5rem;
}

.logged-in .documentation-navigation a {
    color: #0073aa;
    text-decoration: none;
}

.logged-in .documentation-navigation a:hover {
    text-decoration: underline;
}

.wpml-ls {
    display: none !important;
}

/* Documentation Filters Styling */
.logged-in .documentation-sidebar {
    flex: 0 0 300px;
    background: #fff;
    padding: 1.5rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Search & Filter Form Styles */
.searchandfilter {
    margin: 0;
}

.searchandfilter ul {
    margin: 0;
    padding: 0;
}

.searchandfilter ul li {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.searchandfilter ul li:last-child {
    margin-bottom: 0;
}

/* Search Input Styling */
.searchandfilter .sf-field-search {
    width: 100%;
}

.searchandfilter .sf-field-search label {
    width: 100%;
    display: block;
}

.searchandfilter .sf-input-text {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.searchandfilter .sf-input-text:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

/* Reset Link Styling */
.searchandfilter .search-filter-reset {
    display: inline-block;
    padding: 6px 12px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
}

.searchandfilter .search-filter-reset:hover {
    background: #e5e5e5;
    color: #333;
}

/* Select/Combobox Styling */
.searchandfilter .chosen-container {
    width: 100% !important;
    margin-top: 4px;
}

.searchandfilter .chosen-single {
    height: auto !important;
    padding: 8px 12px !important;
    line-height: 1.4 !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    box-shadow: none !important;
}

.searchandfilter .chosen-single span {
    margin-right: 26px;
    color: #333;
    font-size: 14px;
}

.searchandfilter .chosen-single div {
    width: 26px;
}

.searchandfilter .chosen-single div b {
    background-position: 0 7px !important;
}

.searchandfilter .chosen-container-active .chosen-single {
    border-color: #0073aa !important;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2) !important;
}

.searchandfilter .chosen-container .chosen-drop {
    border-color: #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.searchandfilter .chosen-container .chosen-results {
    padding: 0;
    margin: 0;
}

.searchandfilter .chosen-container .chosen-results li {
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
}

.searchandfilter .chosen-container .chosen-results li.highlighted {
    background: #0073aa;
    color: #fff;
}

/* Labels and Headers */
.searchandfilter label {
    display: block;
    margin-bottom: 6px;
    color: #444;
    font-weight: 500;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .logged-in .documentation-container {
        flex-direction: column;
    }

    .logged-in .documentation-sidebar {
        flex: none;
        margin-bottom: 2rem;
    }
}

/* Close Button Styling */
.documentation-close {
    position: absolute;
    top: 0.5rem;
    right: 2.5rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0073aa;
    border: 1px solid #0073aa;
    border-radius: 4px;
    color: #fff;
    transition: all 0.2s ease;
    z-index: 10;
}

.documentation-close:hover {
    background: #006291;
    color: #fff;
    border-color: #006291;
    transform: scale(1.05);
}

.documentation-close svg {
    width: 16px;
    height: 16px;
    stroke-width: 3;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* Edit Button Styling */
.documentation-edit {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 3px;
    color: #666;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-top: -10px;
    margin-bottom: 10px;
}

.documentation-edit:hover {
    background: #e5e5e5;
    color: #333;
    border-color: #ccc;
}

.documentation-edit svg {
    margin-top: -1px;
}

/* Documentation Title */
.documentation-title {
    font-size: 18px;
    font-weight: 500;
    margin: 0 auto;
    padding: 1rem 0 0.5rem;
    max-width: 1200px;
    text-align: center;
}

.documentation-title a {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.2s ease;
}

.documentation-title a:hover {
    color: #006291;
    text-decoration: underline;
}

/* Documentation Navigation */
.documentation-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem 0;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.documentation-nav a {
    padding: 0.5rem 1rem;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.documentation-nav a:hover {
    color: #0073aa;
    background: rgba(0, 115, 170, 0.1);
}

.documentation-nav a.active {
    color: #0073aa;
    background: rgba(0, 115, 170, 0.1);
}

/* Adjust container top margin */
.documentation-container,
.single-documentation-container {
    margin-top: 0;
}
