@import "fonts.css";
@import "base.css";
@import "header-footer.css";
@import "bricks.css";

/*------------------------*/
/* theme colors
/*------------------------*/

:root {
    --textDarker: #1e282d;
    --textDark: rgba(38, 50, 56, 1);
    --textMedium: rgba(38, 50, 56, 0.7);
    --borderMedium: rgba(38, 50, 56, 0.2);
    --borderLight: rgba(38, 50, 56, 0.075);
    --accent: #f4b500;
    --accentDarker: #e6ac00;
    --light: rgba(38, 50, 56, 0.035);
}
/*------------------------*/
/* turn grayscale off
/*------------------------*/

img {filter: grayscale(0);}

/*------------------------*/
/* colorize_image
/*------------------------*/

.colorize_image {filter: contrast(1) sepia(1) hue-rotate(160deg) grayscale(0.8)!important;}

/*------------------------*/
/* black_2_textDark
/*------------------------*/

.map::after, .black_2_textDark {filter: contrast(0.7) sepia(1) hue-rotate(160deg)!important;}

/*------------------------*/
/* black_2_textMedium
/*------------------------*/

.black_2_textMedium {filter: contrast(0.3) sepia(0.3) hue-rotate(160deg) brightness(1.4)!important;}

/*------------------------*/
/* black_2_accent
/*------------------------*/

.black_2_accent {filter: contrast(0.11) sepia(1) hue-rotate(340deg) contrast(13)!important;}


/*------------------------*/
/* dark mode
/*------------------------*/

html[data-theme="dark"] {
    --textDarker: #f1f5f9;
    --textDark: rgba(241, 245, 249, 1);
    --textMedium: rgba(241, 245, 249, 0.7);
    --borderMedium: rgba(241, 245, 249, 0.2);
    --borderLight: rgba(241, 245, 249, 0.075);
    --accent: #f4b500;
    --accentDarker: #e6ac00;
    --light: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] body { background: #0f1117; }
html[data-theme="dark"] html { background: #0f1117; }
html[data-theme="dark"] .innerbody { background: #1a1f2e; }

html[data-theme="dark"] header,
html[data-theme="dark"] header.sticky { background: #1a1f2e; box-shadow: 0 0 0.5rem rgba(0,0,0,0.4); }
html[data-theme="dark"] header .navnav > ul > li > ul { background: #1a1f2e; }
html[data-theme="dark"] body.mobilemenu header .navnav { background: #1a1f2e; }

html[data-theme="dark"] hr { background: rgba(255,255,255,0.1); }
html[data-theme="dark"] .box { background: #252d3d; border-color: rgba(255,255,255,0.07); }
html[data-theme="dark"] ul.prices > li div.box { background: #252d3d; }
html[data-theme="dark"] section.map div.map > .container > div { background: #1a1f2e; }
html[data-theme="dark"] table th { background: #252d3d; }
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select { background: #252d3d; color: rgba(241, 245, 249, 1); border-color: rgba(241,245,249,0.2); }
html[data-theme="dark"] section.image.alt { background: #252d3d; border-color: rgba(255,255,255,0.05); }
html[data-theme="dark"] section.post .container.post { background: #1a1f2e; }

html[data-theme="dark"] .black_2_textDark,
html[data-theme="dark"] .map::after { filter: invert(1) !important; }
html[data-theme="dark"] .black_2_textMedium { filter: invert(1) opacity(0.65) !important; }

html[data-theme="dark"] footer.dark { background: #111827; }

#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem;
    display: flex;
    align-items: center;
    line-height: 1;
    color: var(--textDark);
}
#theme-toggle svg { width: 1.3rem; height: 1.3rem; }
#theme-toggle .icon-moon { display: block; }
#theme-toggle .icon-sun  { display: none; }
html[data-theme="dark"] #theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] #theme-toggle .icon-sun  { display: block; }

/*------------------------*/
/* search panel
/*------------------------*/

#search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    vertical-align: middle;
}

#search-toggle img { height: 1.25rem; }

#search-panel {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s ease, padding 0.28s ease;
    border-top: 0 solid var(--borderLight);
    background: white;
}

#search-panel.open {
    max-height: 75vh;
    padding: 1.25rem 0 1.5rem;
    border-top-width: 1px;
    overflow-y: auto;
}

#search-input {
    width: 100%;
    font-size: 1.1rem;
    padding: 0.7rem 1rem;
    border: 1px solid var(--borderMedium);
    border-radius: 0.5rem;
    background: var(--light);
    color: var(--textDark);
    outline: none;
    font-family: inherit;
}

#search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.15rem rgba(244, 181, 0, 0.2);
}

#search-results {
    margin-top: 0.75rem;
}

a.search-result {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.85rem 0.5rem;
    text-decoration: none;
    border-bottom: 1px solid var(--borderLight);
    transition: background 0.15s;
}

a.search-result:hover { background: var(--light); }

a.search-result strong {
    color: var(--textDarker);
    font-size: 1rem;
    font-weight: 600;
}

a.search-result span {
    color: var(--textMedium);
    font-size: 0.88rem;
    line-height: 1.5;
}

a.search-result mark {
    background: rgba(244, 181, 0, 0.3);
    color: inherit;
    border-radius: 0.15rem;
    padding: 0 0.1rem;
}

.search-no-results {
    color: var(--textMedium);
    padding: 0.75rem 0.5rem;
    font-size: 0.95rem;
}

html[data-theme="dark"] #search-panel { background: #1a1f2e; border-color: rgba(241,245,249,0.08); }
html[data-theme="dark"] #search-input { background: #252d3d; color: rgba(241,245,249,1); border-color: rgba(241,245,249,0.2); }
html[data-theme="dark"] a.search-result:hover { background: rgba(255,255,255,0.04); }
html[data-theme="dark"] a.search-result strong { color: #f1f5f9; }
html[data-theme="dark"] a.search-result mark { color: #f1f5f9; }

/*------------------------*/
/* pagefind ui (página /search)
/*------------------------*/

#search {
    --pagefind-ui-primary: var(--accent);
    --pagefind-ui-text: var(--textDark);
    --pagefind-ui-background: transparent;
    --pagefind-ui-border: var(--borderMedium);
    --pagefind-ui-border-radius: 0.5rem;
    --pagefind-ui-font: inherit;
    margin-top: 1.5rem;
}

html[data-theme="dark"] #search {
    --pagefind-ui-text: rgba(241, 245, 249, 1);
    --pagefind-ui-border: rgba(241, 245, 249, 0.2);
}

/*------------------------ CSS overrides below ------------------------*/