/* Ár-kalkulátor widget stílusok — minden szelektor "arkalk-" prefixet kap,
   hogy ne ütközzön a WordPress témával.

   A színpaletta és a betűtípus a harsanyizoltan.hu arculatát követi:
   meleg krém háttér, sötét szénkék szöveg, korall/narancsvörös kiemelő szín,
   kerekded, barátságos "Outfit" betűtípus. */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap');

.arkalk-widget {
  --arkalk-primary: #e2521e;
  --arkalk-primary-dark: #c13f12;
  --arkalk-selected-bg: #fdece1;
  --arkalk-bg: #f7f3ec;
  --arkalk-card: #ffffff;
  --arkalk-border: #e8e1d4;
  --arkalk-text: #201f2b;
  --arkalk-text-muted: #6b6a73;
  --arkalk-radius: 14px;

  /* A widget mindig a saját, explicit színpalettáját használja, függetlenül
     attól, hogy a befogadó WordPress téma milyen szín-/sötét mód-beállításokat
     kényszerítene rá — ez előzi meg, hogy a szöveg és a háttér színe egybeessen. */
  color-scheme: light;
  box-sizing: border-box;
  max-width: 920px;
  margin: 0 auto;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--arkalk-text) !important;
  background: var(--arkalk-bg) !important;
  border-radius: var(--arkalk-radius);
  padding: 24px;
}

.arkalk-widget *,
.arkalk-widget *::before,
.arkalk-widget *::after {
  box-sizing: border-box;
}

.arkalk-header {
  text-align: center;
  margin-bottom: 24px;
}

.arkalk-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--arkalk-text);
}

.arkalk-header p {
  margin: 0;
  color: var(--arkalk-text-muted);
  font-size: 0.95rem;
}

.arkalk-disclaimer {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  margin-bottom: 20px;
  line-height: 1.4;
}

.arkalk-categories {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.arkalk-category {
  background: var(--arkalk-card);
  border: 1px solid var(--arkalk-border);
  border-radius: var(--arkalk-radius);
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.arkalk-category.is-active {
  border-color: var(--arkalk-primary);
  box-shadow: 0 4px 16px rgba(226, 82, 30, 0.1);
}

.arkalk-category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  user-select: none;
}

.arkalk-category-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.arkalk-category-title {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.arkalk-category-title strong {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--arkalk-text) !important;
}

.arkalk-category-title span {
  font-size: 0.8rem;
  color: var(--arkalk-text-muted);
}

.arkalk-toggle {
  position: relative;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
}

.arkalk-toggle input {
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  position: absolute;
  cursor: pointer;
  z-index: 2;
}

.arkalk-toggle-track {
  position: absolute;
  inset: 0;
  background: #d9d3c6;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.arkalk-toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.arkalk-toggle input:checked + .arkalk-toggle-track {
  background: var(--arkalk-primary);
}

.arkalk-toggle input:checked + .arkalk-toggle-track::after {
  transform: translateX(18px);
}

.arkalk-category-chevron {
  color: var(--arkalk-text-muted);
  transition: transform 0.2s ease;
  font-size: 0.8rem;
}

.arkalk-category.is-active .arkalk-category-chevron {
  transform: rotate(180deg);
}

.arkalk-category-body {
  display: none;
  padding: 0 18px 18px;
  border-top: 1px solid var(--arkalk-border);
  padding-top: 14px;
}

.arkalk-category.is-active .arkalk-category-body {
  display: block;
}

.arkalk-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.arkalk-option:hover {
  background: #f4efe6 !important;
}

/* A kiválasztott csomag/kiegészítő/tétel jól látható háttérrel és kerettel
   emelkedik ki, hogy egyértelmű legyen, mi van bejelölve. */
.arkalk-option.is-selected {
  background: var(--arkalk-selected-bg) !important;
  border-color: var(--arkalk-primary);
}

.arkalk-option.is-selected .arkalk-option-text {
  color: var(--arkalk-primary-dark) !important;
  font-weight: 600;
}

.arkalk-option input {
  margin-top: 3px;
  accent-color: var(--arkalk-primary);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.arkalk-option-text {
  flex: 1;
  font-size: 0.92rem;
  color: var(--arkalk-text) !important;
}

.arkalk-option-price {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--arkalk-primary-dark) !important;
  white-space: nowrap;
}

.arkalk-subheading {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--arkalk-text-muted);
  margin: 14px 0 6px;
}

.arkalk-subheading:first-child {
  margin-top: 0;
}

.arkalk-summary {
  position: sticky;
  bottom: 12px;
  margin-top: 24px;
  background: linear-gradient(135deg, var(--arkalk-primary), var(--arkalk-primary-dark));
  color: #fff;
  border-radius: var(--arkalk-radius);
  padding: 20px 22px;
  box-shadow: 0 10px 30px rgba(226, 82, 30, 0.3);
}

.arkalk-summary-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
  font-size: 0.88rem;
}

.arkalk-summary-row {
  display: flex;
  justify-content: space-between;
  opacity: 0.9;
}

.arkalk-summary-empty {
  opacity: 0.85;
  font-size: 0.9rem;
}

.arkalk-summary-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: baseline;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  padding-top: 12px;
}

.arkalk-summary-total-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
  display: block;
  margin-bottom: 2px;
}

.arkalk-summary-total-value {
  font-size: 1.5rem;
  font-weight: 800;
}

.arkalk-cta {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.arkalk-cta a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: var(--arkalk-primary-dark);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 18px;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.arkalk-cta a:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.arkalk-cta a.arkalk-cta-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.arkalk-footnote {
  margin-top: 16px;
  font-size: 0.78rem;
  color: var(--arkalk-text-muted);
  text-align: center;
  line-height: 1.5;
}

@media (max-width: 560px) {
  .arkalk-widget {
    padding: 16px;
  }
  .arkalk-summary {
    position: static;
  }
  .arkalk-summary-totals {
    flex-direction: column;
    gap: 8px;
  }
}
