/*
Theme Name: Calculator Convert
Theme URI: https://calculator-convert.com/
Author: Calculator-Convert
Description: A lightweight, multilingual WordPress theme for Calculator-Convert.
Version: 1.0.1
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: calculator-convert-theme
*/

:root {
  --theme-text-color: #203443;
  --theme-heading-color: #15354a;
  --theme-link-initial-color: #076658;
  --theme-link-hover-color: #03483e;
  --theme-container-width: 1180px;
  --cc-edge: clamp(12px, 3vw, 28px);
  --cc-line: #dce7ec;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: #f8fafc; color: var(--theme-text-color); font: 16px/1.6 system-ui, sans-serif; }
a { color: var(--theme-link-initial-color); text-underline-offset: .15em; }
a:hover { color: var(--theme-link-hover-color); }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 2px solid #0664ad; outline-offset: 3px; }
h1, h2, h3, h4 { color: var(--theme-heading-color); line-height: 1.2; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.screen-reader-text:focus {
  z-index: 10001;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  width: auto;
  height: auto;
  padding: 8px 12px;
  clip-path: none;
  background: #fff;
}

.cc-site-shell { display: flex; flex-direction: column; min-height: 100vh; }
.cc-site-header {
  position: relative;
  /* Keep the language dropdown above File Sync's adjacent page navigation. */
  z-index: 30;
  background: #fff;
  border-block-end: 1px solid var(--cc-line);
}
.cc-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 18px;
  width: min(calc(100% - 2 * var(--cc-edge)), var(--theme-container-width));
  margin-inline: auto;
  padding-block: 8px;
}
.cc-site-brand { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; color: var(--theme-heading-color); font-size: 1.12rem; font-weight: 800; text-decoration: none; }
.cc-site-brand img { flex: 0 0 38px; width: 38px; height: 38px; object-fit: contain; }
.cc-site-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 0 8px; }
.cc-site-controls > a, .cc-site-controls li > a, .cc-language-picker summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 650;
  text-decoration: none;
}
.cc-site-controls > a:hover, .cc-site-controls li > a:hover, .cc-language-picker summary:hover { background: #edf6f4; }
.cc-site-controls .cc-report-links { margin: 0; padding: 0; list-style: none; }
.cc-language-picker { position: relative; }
.cc-language-picker summary::-webkit-details-marker { display: none; }
.cc-language-picker summary::after { content: ''; width: 6px; height: 6px; border-inline-end: 2px solid; border-block-end: 2px solid; transform: translateY(-2px) rotate(45deg); }
.cc-language-options {
  position: absolute;
  inset-block-start: calc(100% + 4px);
  inset-inline-end: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(270px, calc(100vw - 2 * var(--cc-edge)));
  max-height: min(370px, 65vh);
  overflow: auto;
  padding: 7px;
  background: #fff;
  border: 1px solid var(--cc-line);
  border-radius: 12px;
  box-shadow: 0 8px 24px #16314522;
}
.cc-language-options a { display: block; padding: 9px 8px; border-radius: 6px; overflow-wrap: anywhere; font-size: .875rem; text-decoration: none; }
.cc-language-options a:hover, .cc-language-options a[aria-current] { background: #edf6f4; }
@media (max-width: 620px) {
  .cc-header-inner { align-items: start; }
  .cc-site-controls { width: 100%; }
  .cc-language-picker { position: static; }
  .cc-language-options { inset-inline-start: var(--cc-edge); inset-inline-end: auto; }
}

#main { flex: 1; min-width: 0; padding: 16px var(--cc-edge) 36px; outline: none; }
.cc-site-content { width: min(100%, var(--theme-container-width)); margin-inline: auto; overflow-wrap: break-word; }
.cc-site-content > article { min-width: 0; }
.cc-entry-title { margin: .5em 0 .65em; font-size: clamp(1.75rem, 4vw, 2.6rem); }
.cc-site-content .entry-content > :first-child { margin-block-start: 0; }
.cc-site-content .alignleft { float: left; margin: 0 1em 1em 0; }
.cc-site-content .alignright { float: right; margin: 0 0 1em 1em; }
.cc-site-content .aligncenter { display: block; margin-inline: auto; }
.cc-site-content pre { overflow: auto; }
.cc-site-content .cc-post-list > article + article { border-block-start: 1px solid var(--cc-line); }
.cc-site-footer { padding: 19px var(--cc-edge); border-block-start: 1px solid var(--cc-line); background: #f0f5f8; text-align: center; font-size: .9rem; }
.cc-site-footer p { margin: 0; }
