/*--
  Paramedic Documentation Suite
  Version: 2.1.0 | Author: Vlad da Cunha
  Verified for internal use.
  Integrity Checksum: d9de731de966d37fc9fb44cd730893de46fc0a0ae38772f4e980b31102186d9f
  Generated: 2025-11-13
--*/


/* ----------------------------------------------------------
   GLOBAL STYLES — shared by all tools and index
----------------------------------------------------------- */

:root {
  --primary: #00796b;
  --accent: #fdd835;
  --bg-light: #f5f7f8;
  --text-dark: #2f3e46;
  --card-bg: #ffffff;
  --border-light: #dde5e4;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3 {
  color: var(--primary);
  margin-top: 0;
}

h1.master-header{
  color: #fff;
}

p { line-height: 1.5; color: #555; }

/* ----------------------------------------------------------
   MINI HEADER BAR (shared, loaded via header.html)
----------------------------------------------------------- */
.tool-header {
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  padding: 10px 24px;
  display: flex;
  lex-wrap: nowrap;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  height: 50px;
}

.header-right {
  font-size: 0.8rem;
  text-align: right;
  color: #999999;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #00796b;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.25s, transform 0.15s;
}

.back-link:hover {
  background: #e0f2f1;
  transform: translateY(-1px);
}

.back-link i {
  font-size: 0.85rem;
}


/* ----------------------------------------------------------
   STICKY HEADER & FOOTER (desktop)
----------------------------------------------------------- */
@media (min-width: 769px) {
  .tool-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
  }

  .site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
  }

  /* Adjust page layout so content isn't hidden */
  body {
    padding-top: var(--header-height);  /* space for header */
    padding-bottom: var(--footer-height); /* space for footer */
  }

  .container {
    height: calc(100vh - var(--footer-height) - var(--header-height));
    overflow-y: hidden;
  }
}

.footer-left {
    padding-right: 10px;
}
.footer-right {
  padding: 0 0 5px 0;
  line-height: 1.1rem;
}

/* ----------------------------------------------------------
   INDEX PAGE
----------------------------------------------------------- */
header.hero {
  background: var(--primary);
  color: white;
  text-align: center;
  padding: 25px 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

header.hero h1 {
  margin: 0;
    font-size: 1.8rem;
    letter-spacing: 0.5px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
}

object.logo-icon {
    width: 52px;
    height: 30px;
    padding: 0 10px 0 0;
}

main.index {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
  gap: 30px;
}

a.card {
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  width: 300px;
  height: 320px;
  padding: 25px;
  text-align: center;
  border-top: 5px solid var(--primary);
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

a.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  background: #f9fdfc;
}

.icon {
  font-size: 2.8rem;
  color: var(--primary);
  margin-bottom: 12px;
}

a.card h2 {
  font-size: 1.25rem;
  margin: 8px 0;
}
a.card p {
  font-size: 0.93rem;
  color: #607273;
  margin: 10px 0 0;
  line-height: 1.4;
  flex-grow: 1;
}

.button {
  background: var(--primary);
  color: white;
  padding: 8px 0;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.3s;
  margin-top: 20px;
}
a.card:hover .button { background: #004d40; }

/* ----------------------------------------------------------
   GLOBAL FOOTER (shared, loaded via footer.html)
----------------------------------------------------------- */
.site-footer {
  text-align: center;
  background: #e0f2f1;
  color: #336d67;
  line-height: 1.5;
  font-size: 0.8rem;
  border-top: 1px solid #cde3e1;
  box-shadow: 0 -1px 4px rgba(0,0,0,0.05);
  margin-top: auto;
  width: 100%;
  display: flex;
  flex-wrap: nowrap;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.site-footer i { color: var(--primary); margin-right: 5px; font-size: 0.9rem; }
.site-footer p { margin: 0; font-weight: 500; letter-spacing: 0.2px; line-height: 1.2rem; }

.site-footer .split-horizontal {
  display: flex;
  flex-direction: row;
  padding: 10px;
}

object.logo-icon-footer {
    width: 170px;
}

/* Disclaimer Section (below footer) */
.disclaimer-bar {
  background-color: #004d4d; /* darker teal tone */
  color: #f0f8f8;            /* soft light text */
  text-align: center;
  font-size: 0.7rem;
  border-top: 2px solid #007c7c;
  padding: 5px;
  width: 100%;
}


/* ----------------------------------------------------------
   TOOL PAGE STRUCTURE (VIRCA + MSE)
----------------------------------------------------------- */
.container { display: flex; width: 100%; }
.left, .right { padding: 30px 30px 100px 30px; overflow-y: auto; }
.left { width: 60%; background: var(--card-bg); }
.right {
  width: 40%;
  background: #fffbe6;
  border-left: 2px solid var(--accent);
  position: sticky; top: 0; 
  box-shadow: -4px 0 8px rgba(0,0,0,0.05);
}

.section {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 15px 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border-left: 4px solid #e0f2f1;
}

h2.tool-title {
  font-size: 1.6rem;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 6px;
}
h3 { font-size: 1.15rem; margin-bottom: 4px; }

label .description {
  font-style: italic;
  font-size: 0.8rem !important;
  color: #999 !important;
  margin: 4px 0 10px;
  line-height: 1.4;
}

input[type="checkbox"] {
  accent-color: var(--primary);
  transform: scale(1.2);
  margin-right: 8px;
  position: absolute;
  left: 0;
  top: 0.2em;      
}

.checkbox-group label {
  display: block;
  margin: 6px 0;
  cursor: pointer;
  font-size: 0.95rem;
  position: relative;
  padding-left: 1.8em;
  line-height: 1.4;
}

input[type="text"], textarea {
  width: 100%;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 8px;
  margin-top: 6px;
  font-size: 0.95rem;
  transition: border-color 0.3s;
  resize: vertical;
}
input[type="text"]:focus, textarea:focus {
  border-color: var(--primary);
  outline: none;
}

.sentence {
  background: #fff;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  line-height: 1.5;
}
.sentence strong { color: var(--primary); }
.copy-icon {
  position: absolute;
  top: 12px;
  right: 15px;
  cursor: pointer;
  color: var(--primary);
  transition: color 0.2s;
}
.copy-icon:hover { color: #004d40; }
#copyAll {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
  margin-top: 15px;
}
#copyAll:hover { background: #004d40; }

/* ----------------------------------------------------------
   MOBILE FLOATING TOGGLE BUTTON (mobile-only, fade-in/out)
----------------------------------------------------------- */
.toggle-btn {
  display: none; /* hidden by default, only visible on mobile via media query */
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
  opacity: 0;
  pointer-events: none;
}
.toggle-btn i { margin-right: 6px; }
.toggle-btn:hover { background: #004d40; transform: translateY(-2px); }

/* Visible state toggled by JS on mobile */
.toggle-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ----------------------------------------------------------
   RESPONSIVE DESIGN
----------------------------------------------------------- */

/* Medium screens (tablets, small laptops) */
@media (max-width: 1024px) {
  .container { flex-direction: column; }
  .left, .right {
    width: 100%;
    height: auto;
    position: relative;
    box-shadow: none;
  }
  .right {
    border-left: none;
    border-top: 2px solid var(--accent);
    background: #fffdf2;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
  }
}

/* Small screens (phones) */
@media (max-width: 768px) {
  body { font-size: 0.9rem; }
  .container { flex-direction: column; padding: 10px; }
  .left, .right { width: 100%; padding: 20px; }
  .section { margin-bottom: 15px; padding: 12px 16px; }
  .tool-header, .site-footer, .site-footer .split-horizontal { text-align: center; flex-direction: column; }
  h2.tool-title { font-size: 1.3rem; }
  h3 { font-size: 1rem; }
  #copyAll { font-size: 0.9rem; padding: 10px; }
  .sentence { padding: 12px; }
  .right { background: #fff; border-top: 2px solid var(--accent); }

  /* Show the floating toggle on phones only */
  .toggle-btn { display: flex; align-items: center; justify-content: center; }
}


/* Enable scrolling inside flex children on iOS */
.left, .right {
  -webkit-overflow-scrolling: touch;
  overflow-y: auto;
}