/**
 * Online Calculator Pro Core Theme CSS
 * High-performance styling matching original Tailwind CSS design specifications
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600;700;800&display=swap');

/* Typography & Base */
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: #f8f3ec;
  color: #29180f;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

code, pre, .font-mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* Range input styling */
input[type="range"] {
  accent-color: #92400e;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Scrollbar Utility */
.scrollbar-none::-webkit-scrollbar {
  display: none;
}
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ------------------------------------------------------------------
   Header: Calculators dropdown (pure CSS, works on every page)
------------------------------------------------------------------- */
.site-header { z-index: 100; }

.ocp-dropdown { position: relative; }

.ocp-dropdown-panel {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  padding-top: 4px;
  min-width: 260px;
  z-index: 120;
}

.ocp-dropdown:hover > .ocp-dropdown-panel,
.ocp-dropdown:focus-within > .ocp-dropdown-panel,
.ocp-dropdown.is-open > .ocp-dropdown-panel {
  display: block;
}

/* ------------------------------------------------------------------
   Editor content: anything typed in the WordPress editor (pages, posts,
   calculator pages) is styled to match the theme.
------------------------------------------------------------------- */
.entry-content {
  color: #451a03;
  font-size: 1rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  color: #3a1d0f;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}
.entry-content h1 { font-size: 1.875rem; }
.entry-content h2 { font-size: 1.5rem; }
.entry-content h3 { font-size: 1.25rem; }
.entry-content h4 { font-size: 1.1rem; }
.entry-content p { margin: 0 0 1rem; color: #451a03; }
.entry-content a { color: #92400e; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.entry-content a:hover { color: #78350f; }
.entry-content strong, .entry-content b { color: #3a1d0f; font-weight: 700; }
.entry-content ul,
.entry-content ol { margin: 0 0 1.1rem 1.4rem; padding: 0; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin: 0.35rem 0; padding-left: 0.2rem; }
.entry-content li::marker { color: #92400e; }
.entry-content blockquote {
  margin: 1.5rem 0;
  padding: 0.9rem 1.25rem;
  border-left: 4px solid #92400e;
  background: #f5ede2;
  border-radius: 0 12px 12px 0;
  color: #5c3a21;
  font-style: italic;
}
.entry-content hr { border: 0; border-top: 1px solid #ebd6b7; margin: 2rem 0; }
.entry-content img,
.entry-content video,
.entry-content iframe { max-width: 100%; height: auto; border-radius: 14px; }
.entry-content figure { margin: 1.5rem 0; }
.entry-content figcaption { font-size: 0.8rem; color: #6b4729; text-align: center; margin-top: 0.5rem; }
.entry-content code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  background: #eedfc8;
  color: #78350f;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  font-size: 0.9em;
}
.entry-content pre {
  background: #3a1d0f;
  color: #fef3c7;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  overflow-x: auto;
}
.entry-content pre code { background: transparent; color: inherit; padding: 0; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 0.9rem; display: block; overflow-x: auto; }
.entry-content th,
.entry-content td { border: 1px solid #ebd6b7; padding: 0.6rem 0.8rem; text-align: left; }
.entry-content th { background: #eedfc8; color: #3a1d0f; font-weight: 700; }
.entry-content tr:nth-child(even) td { background: #f5ede2; }
.entry-content .wp-block-button__link,
.entry-content .button {
  background: #92400e;
  color: #fff;
  border-radius: 12px;
  padding: 0.7rem 1.3rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
}
.entry-content .wp-block-button__link:hover { background: #78350f; color: #fff; }
.entry-content .wp-block-image img { border-radius: 14px; }
.entry-content .page-links { margin-top: 1.5rem; font-weight: 700; color: #78350f; }
.entry-content > :first-child { margin-top: 0; }

/* Post tag chips + misc */
.ocp-tag-chip { transition: background 0.15s ease; }
.ocp-tag-chip:hover { background: #eedfc8; }

/* ------------------------------------------------------------------
   Comments: form fields with visible outlines + comment list styling
------------------------------------------------------------------- */
#respond input[type="text"],
#respond input[type="email"],
#respond input[type="url"],
#respond input[type="password"],
#respond textarea,
.ocp-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  color: #3a1d0f;
  border: 1.5px solid #d4b08c;
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  font-size: 0.9rem;
  line-height: 1.5;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(120, 53, 15, 0.06);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}
#respond textarea,
textarea.ocp-input { min-height: 150px; resize: vertical; }
#respond input[type="text"]:hover,
#respond input[type="email"]:hover,
#respond input[type="url"]:hover,
#respond textarea:hover,
.ocp-input:hover { border-color: #b8814f; }
#respond input[type="text"]:focus,
#respond input[type="email"]:focus,
#respond input[type="url"]:focus,
#respond textarea:focus,
.ocp-input:focus {
  outline: none;
  border-color: #92400e;
  box-shadow: 0 0 0 3px rgba(146, 64, 14, 0.18);
}
#respond ::placeholder { color: #a76b35; opacity: 0.7; }
#respond label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #451a03;
  margin-bottom: 0.35rem;
}
#respond .required { color: #b91c1c; }
#respond .comment-form-cookies-consent { display: flex; align-items: center; gap: 0.5rem; }
#respond .comment-form-cookies-consent label { margin: 0; font-weight: 500; color: #6b4729; }
#respond .comment-form-cookies-consent input { width: 1.05rem; height: 1.05rem; accent-color: #92400e; }
#respond .form-submit { margin: 0; }
#respond .logged-in-as,
#respond .comment-notes { font-size: 0.78rem; color: #6b4729; }
#respond .logged-in-as a { color: #92400e; font-weight: 600; text-decoration: underline; }
#cancel-comment-reply-link { margin-left: 0.6rem; font-size: 0.75rem; color: #92400e; font-weight: 600; }
@media (min-width: 768px) {
  .ocp-comment-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .ocp-comment-form > .comment-notes,
  .ocp-comment-form > .comment-form-comment,
  .ocp-comment-form > .comment-form-cookies-consent,
  .ocp-comment-form > .form-submit,
  .ocp-comment-form > .logged-in-as { grid-column: 1 / -1; }
}

.comment-list,
.comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { margin-left: 1.5rem; border-left: 2px solid #ebd6b7; padding-left: 1rem; }
.comment-list > li { padding: 1rem 0; }
.comment-body { background: #f5ede2; border: 1px solid #ebd6b7; border-radius: 14px; padding: 1rem 1.1rem; }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; font-size: 0.78rem; color: #6b4729; }
.comment-author { display: flex; align-items: center; gap: 0.6rem; }
.comment-author .avatar { border-radius: 999px; border: 2px solid #d4b08c; }
.comment-author .fn { font-weight: 800; color: #3a1d0f; font-style: normal; }
.comment-author .says { display: none; }
.comment-metadata a { color: #78350f; text-decoration: none; }
.comment-content { font-size: 0.9rem; line-height: 1.65; color: #451a03; }
.comment-content p { margin: 0 0 0.6rem; }
.comment-body .reply a {
  display: inline-block; margin-top: 0.4rem; font-size: 0.75rem; font-weight: 700;
  color: #92400e; border: 1px solid #d4b08c; background: #fbf7f0; padding: 0.25rem 0.7rem; border-radius: 8px;
}
.comment-body .reply a:hover { background: #eedfc8; }
.comment-awaiting-moderation { font-size: 0.78rem; font-style: italic; color: #78350f; }
