/*
Theme Name: nemokamas.org
Theme URI: https://nemokamas.org/
Author: nemokamas.org
Description: Nemokami internetiniai testavimo ir generavimo įrankiai (garsas, kamera, mikrofonas, QR ir kt.).
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nemokamas-org
*/

:root {
      --bg-body: #202123;
      --bg-main: #343541;
      --bg-header: #202123;
      --bg-tool: #202123;
      --bg-tool-hover: #2a2b32;
      --bg-banner: #202123;
      --bg-modal: #202123;
      --text-main: #e5e7eb;
      --text-muted: #9ca3af;
      --accent: #10a37f;
      --border-soft: #4b5563;
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      background: var(--bg-body);
      color: var(--text-main);
    }

    header {
      position: sticky;
      top: 0;
      z-index: 20;
      background: var(--bg-header);
      border-bottom: 1px solid var(--border-soft);
    }

    .nav {
      max-width: 1100px;
      margin: 0 auto;
      padding: 0.65rem 1.2rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .nav-left {
      font-weight: 600;
      font-size: 0.95rem;
      letter-spacing: 0.05em;
      color: var(--text-main);
      display: flex;
      align-items: center;
    }

    .nav-right {
      display: flex;
      gap: 0.6rem;
      font-size: 0.85rem;
      align-items: center;
      justify-content: flex-end;
    }

    .nav-right button {
      border: none;
      background: transparent;
      color: var(--text-muted);
      padding: 0.25rem 0.6rem;
      border-radius: 4px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
    }
    .nav-right button:hover {
      background: #2f3138;
      color: var(--text-main);
    }

    main {
      max-width: 1100px;
      margin: 0 auto;
      padding: 1.7rem 1.2rem 4.2rem;
    }

    .panel {
      background: var(--bg-main);
      border-radius: 12px;
      padding: 1.2rem 1.4rem 1.4rem;
      border: 1px solid #2f3138;
      position: relative;
      overflow: hidden;
    }

    .tools-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
      gap: 0.7rem;
    }

    .tool-card {
      border-radius: 10px;
      padding: 0.7rem 0.7rem;
      background: var(--bg-tool);
      color: var(--text-main);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0.35rem;
      font-size: 0.8rem;
      cursor: pointer;
      transition: background 0.12s ease, transform 0.08s ease;
      border: 1px solid #2f3138;
    }
    .tool-card:hover {
      background: var(--bg-tool-hover);
      transform: translateY(-1px);
    }

    .tool-icon {
      width: 26px;
      height: 26px;
      border-radius: 999px;
      border: 1px solid var(--border-soft);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.85rem;
      color: var(--text-muted);
    }

    .tool-label {
      text-align: center;
      white-space: normal;
    }

    @media (max-width: 720px) {
      .panel { padding: 1.1rem; }
    }

    /* COOKIE BANNER (orig style) */
    #cookie-banner {
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 30;
      background: var(--bg-banner);
      border-top: 1px solid var(--border-soft);
      padding: 0.2rem 0;
      font-size: 0.75rem;
      display: block !important;
    }

    .cookie-inner {
      flex-wrap: nowrap !important;
      justify-content: center !important;
      gap: 1rem !important;
      max-width: 1100px;
      margin: 0 auto;
      padding: 0.2rem 1.2rem;
      display: flex;
      flex-wrap: wrap;
      gap: 0.3rem;
      align-items: center;
      justify-content: center;
    }

    .cookie-text {
      white-space: nowrap !important;
      color: var(--text-muted);
      flex: 0 0 auto;
      text-align: center;
    }

    .cookie-actions {
      flex-wrap: nowrap !important;
      white-space: nowrap !important;
      display: flex;
      flex-wrap: wrap;
      gap: 0.3rem;
      justify-content: center;
    }

    .btn {
      border-radius: 999px;
      padding: 0.2rem 0.7rem;
      font-size: 0.72rem;
      border: 1px solid transparent;
      cursor: pointer;
      background: transparent;
      color: var(--text-main);
      white-space: nowrap;
    }
    .btn-outline {
      border-color: var(--border-soft);
      color: var(--text-main);
    }
    .btn-outline:hover { background: #2f3138; }
    .btn-primary {
      background: var(--accent);
      color: #ffffff;
      border-color: var(--accent);
    }
    .btn-primary:hover { filter: brightness(1.05); }

    /* COOKIE MODAL */
    #cookie-modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.65);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 40;
    }

    #cookie-modal {
      background: var(--bg-modal);
      border-radius: 10px;
      border: 1px solid var(--border-soft);
      width: min(520px, 100% - 2.5rem);
      padding: 1rem 1.1rem 0.9rem;
      font-size: 0.82rem;
    }

    .modal-header {
      display: flex;
      justify-content: space-between;
      gap: 0.7rem;
      align-items: flex-start;
      margin-bottom: 0.4rem;
    }
    .modal-header h2 {
      margin: 0;
      font-size: 0.95rem;
      text-align: center;
    }
    .modal-body { margin-top: 0.3rem; }
    .modal-footer {
      display: flex;
      justify-content: flex-end;
      gap: 0.4rem;
      margin-top: 0.6rem;
    }
    .modal-footer .btn {
      padding: 0.2rem 0.6rem;
      font-size: 0.78rem;
    }

    .close-btn {
      border-radius: 999px;
      border: 1px solid var(--border-soft);
      padding: 0.2rem 0.6rem;
      font-size: 0.78rem;
      background: transparent;
      color: var(--text-muted);
      cursor: pointer;
    }
    .close-btn:hover {
      background: #2f3138;
      color: var(--text-main);
    }

    .cookie-option {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.7rem;
      margin: 0.4rem 0;
    }
    .cookie-option-text {
      font-size: 0.8rem;
      color: var(--text-muted);
    }
    .cookie-option-label {
      font-weight: 500;
      color: var(--text-main);
      margin-bottom: 0.15rem;
      font-size: 0.8rem;
    }
    .pill-required,
    .pill-optional {
      display: inline-flex;
      align-items: center;
      border-radius: 999px;
      border: 1px solid var(--border-soft);
      padding: 0.05rem 0.4rem;
      font-size: 0.7rem;
      margin-left: 0.2rem;
      color: var(--text-muted);
    }

    /* info + tool modal */
    #info-modal-backdrop,
    #tool-modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.65);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 50;
    }

    #info-modal,
    #tool-modal {
      background: var(--bg-modal);
      border-radius: 10px;
      border: 1px solid var(--border-soft);
      width: min(620px, 100% - 2.5rem);
      padding: 1rem 1.2rem 1rem;
      font-size: 0.84rem;
    }

    #info-modal h2,
    #tool-modal h2 {
      margin: 0 0 0.4rem;
      font-size: 0.95rem;
      text-align: center;
    }
    #info-modal-body {
      text-align: left;
      line-height: 1.5;
    }
    #info-modal-body p,
    #info-modal-body li {
      color: var(--text-muted);
      font-size: 0.84rem;
    }
    #info-modal-body ul {
      margin: 0.3rem 0 0.3rem 1.1rem;
      padding: 0;
    }

    .tool-section { margin-top: 0.6rem; }
    .tool-section label {
      display: block !important;
      font-size: 0.8rem;
      margin-bottom: 0.15rem;
      color: var(--text-muted);
    }
    .tool-textarea {
      width: 100%;
      padding: 0.38rem 0.5rem;
      border-radius: 6px;
      border: 1px solid var(--border-soft);
      background: #18181b;
      color: var(--text-main);
      font-size: 0.8rem;
      min-height: 80px;
      resize: vertical;
    }

    .qr-container {
      margin-top: 0.6rem;
      display: flex;
      justify-content: center;
    }
    .qr-box {
      width: 180px;
      height: 180px;
      background: #111827;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 8px;
      border: 1px solid var(--border-soft);
    }

    /* toggle */
    .switch {
      position: relative;
      display: inline-block;
      width: 38px;
      height: 20px;
    }
    .switch input {
      opacity: 0;
      width: 0;
      height: 0;
    }
    .slider {
      position: absolute;
      cursor: pointer;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: #4b5563;
      transition: .2s;
      border-radius: 999px;
    }
    .slider:before {
      position: absolute;
      content: "";
      height: 14px;
      width: 14px;
      left: 3px;
      bottom: 3px;
      background-color: #ffffff;
      transition: .2s;
      border-radius: 50%;
    }
    .switch input:checked + .slider {
      background-color: var(--accent);
    }
    .switch input:checked + .slider:before {
      transform: translateX(18px);
    }

/* Mini toolbar grid styling for sound page */
.tools-grid-mini {
  margin-bottom: 0.75rem;
}
.tools-grid-mini .tool-card {
  padding: 0.4rem 0.4rem;
  gap: 0.2rem;
}
.tools-grid-mini .tool-label {
  display: none;
}
.tools-grid-mini .tool-icon {
  width: 22px;
  height: 22px;
  font-size: 0.75rem;
}




.site-footer {
  background: var(--bg-banner);
  border-top: 1px solid var(--border-soft);
  font-size: 0.75rem;
  padding: 0.2rem 0.4rem;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
}


.site-footer .footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.2rem 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.site-footer .footer-inner p {
  margin: 0;
}

.site-footer .footer-nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  justify-content: center;
}

.site-footer .footer-nav a {
  text-decoration: none;
}

.site-footer .footer-nav a:hover {
  text-decoration: underline;
}
