/* ======= HAVNEHYTTEN PRO – FRONTEND v3.8 ======= */

/* LANGUAGE BAR (on bestillings page only) */
.hh-lang-bar { display:flex; justify-content:flex-end; gap:4px; margin-bottom:8px; }
.hh-lang-btn { padding:4px 10px; border:2px solid #0b3b2e; border-radius:6px; background:transparent; color:#0b3b2e; font-weight:700; font-size:0.9rem; cursor:pointer; font-family:inherit; transition:all .15s; line-height:1.2; }
.hh-lang-btn.active { background:#0b3b2e; color:#d4af37; }
.hh-lang-btn:hover { background:#145a44; color:#fff; }

.hh-app { font-family:system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif; max-width:800px; margin:0 auto; color:#333; }

/* HEADER */
.hh-header { background:linear-gradient(135deg,#0b3b2e,#145a44); color:#fff; padding:24px 20px; border-radius:12px; margin-bottom:20px; text-align:center; }
.hh-header h2 { color:#d4af37; margin:0 0 6px; font-size:1.6rem; }
.hh-header p { margin:0; opacity:0.85; font-size:0.95rem; }

.hh-loading { text-align:center; padding:40px; color:#888; }

/* CATEGORY – DARK GREEN BAR */
.hh-category { margin-bottom:24px; }
.hh-category-title {
  background:#0b3b2e; color:#d4af37; padding:10px 16px; border-radius:8px;
  font-size:1.1rem; font-weight:700; margin-bottom:10px; cursor:pointer; user-select:none;
  display:flex; justify-content:space-between; align-items:center;
}
.hh-category-title:hover { background:#145a44; }
.hh-category-title .arrow { transition:transform 0.2s; color:#d4af37; }
.hh-category-title.open .arrow { transform:rotate(180deg); }
.hh-category-items { display:none; }
.hh-category-items.open { display:block; }

/* PRODUCT CARD */
.hh-product { display:flex; justify-content:space-between; align-items:center; padding:12px 16px; border-bottom:1px solid #eee; gap:12px; }
.hh-product:last-child { border-bottom:none; }
.hh-product-info { flex:1; min-width:0; }
.hh-product-name { font-weight:600; font-size:0.95rem; }
.hh-product-desc { font-size:0.8rem; color:#888; margin-top:2px; }
.hh-product-prices { text-align:right; white-space:nowrap; }
.hh-product-price { font-weight:700; color:#0b3b2e; }
.hh-product-menu-price { font-size:0.8rem; color:#666; }
.hh-add-btns { display:flex; gap:6px; flex-shrink:0; }
.hh-add-btn {
  padding:6px 12px; border:2px solid #0b3b2e; border-radius:6px; background:#fff;
  color:#0b3b2e; font-size:0.8rem; font-weight:600; cursor:pointer; transition:all 0.15s;
}
.hh-add-btn:hover { background:#0b3b2e; color:#fff; }
.hh-add-btn.menu-btn { border-color:#d4af37; color:#8b6914; }
.hh-add-btn.menu-btn:hover { background:#d4af37; color:#fff; }

/* MODAL */
.hh-modal-overlay {
  position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.6);
  z-index:10000; display:flex; align-items:center; justify-content:center; padding:16px;
}
.hh-modal {
  background:#fff; border-radius:14px; max-width:440px; width:100%; max-height:85vh;
  overflow-y:auto; padding:24px; box-shadow:0 20px 60px rgba(0,0,0,0.3);
}
.hh-modal-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; border-bottom:2px solid #0b3b2e; padding-bottom:12px; }
.hh-modal-header h3 { margin:0; font-size:1.1rem; color:#0b3b2e; flex:1; }
.hh-modal-price { font-weight:700; color:#d4af37; font-size:1.1rem; white-space:nowrap; margin-left:12px; }
.hh-opt-group { margin-bottom:14px; }
.hh-opt-group label { display:block; font-weight:600; font-size:0.85rem; margin-bottom:4px; color:#555; }
.hh-opt-select, .hh-opt-input {
  width:100%; padding:10px 12px; border:1px solid #ddd; border-radius:6px;
  font-size:0.95rem; font-family:inherit; background:#fff;
}
.hh-opt-select:focus, .hh-opt-input:focus { outline:none; border-color:#0b3b2e; box-shadow:0 0 0 2px rgba(11,59,46,0.15); }
.hh-opt-checkbox label { font-weight:500; font-size:0.9rem; cursor:pointer; display:flex; align-items:center; gap:8px; }
.hh-opt-checkbox input[type="checkbox"] { width:18px; height:18px; accent-color:#0b3b2e; }
.hh-modal-actions { display:flex; gap:10px; margin-top:18px; }
.hh-modal-actions .hh-btn { flex:1; }

/* CART BAR */
.hh-cart-bar {
  position:sticky; bottom:0; background:#0b3b2e; color:#fff; padding:14px 20px;
  border-radius:12px 12px 0 0; display:flex; justify-content:space-between; align-items:center;
  margin-top:20px; z-index:100; box-shadow:0 -4px 20px rgba(0,0,0,0.15);
}
.hh-cart-summary { font-size:1rem; }

/* CHECKOUT */
.hh-checkout { padding:10px 0; }
.hh-checkout h3 { font-size:1.3rem; margin-bottom:16px; color:#0b3b2e; }
.hh-checkout-item { display:flex; justify-content:space-between; align-items:center; padding:8px 0; border-bottom:1px solid #eee; font-size:0.9rem; }
.hh-checkout-item-name { flex:1; line-height:1.4; }
.hh-checkout-item-qty { display:flex; align-items:center; gap:8px; }
.hh-qty-btn { width:28px; height:28px; border:1px solid #ccc; border-radius:50%; background:#f5f5f5; cursor:pointer; font-size:1rem; display:flex; align-items:center; justify-content:center; }
.hh-qty-btn:hover { background:#ddd; }
.hh-checkout-item-price { font-weight:600; min-width:70px; text-align:right; }
.hh-checkout-fee { padding:8px 0; font-size:0.9rem; color:#555; border-bottom:1px solid #f0f0f0; }
.hh-checkout-total { text-align:right; font-size:1.2rem; padding:14px 0; border-top:2px solid #0b3b2e; margin-top:10px; }
.hh-notice-warning { background:#fff3cd; border:1px solid #ffc107; padding:8px 12px; border-radius:6px; font-size:0.85rem; margin-bottom:10px; }

/* FORM */
.hh-form { margin-top:20px; }
.hh-field { margin-bottom:14px; }
.hh-field label { display:block; font-weight:600; font-size:0.85rem; margin-bottom:4px; color:#555; }
.hh-field input, .hh-field select, .hh-field textarea { width:100%; padding:10px 12px; border:1px solid #ddd; border-radius:6px; font-size:1rem; font-family:inherit; }
.hh-field input:focus, .hh-field select:focus, .hh-field textarea:focus { outline:none; border-color:#0b3b2e; box-shadow:0 0 0 2px rgba(11,59,46,0.15); }

/* BUTTONS */
.hh-btn { padding:10px 20px; border:none; border-radius:8px; font-size:0.95rem; font-weight:600; cursor:pointer; font-family:inherit; transition:all 0.15s; }
.hh-btn-primary { background:#d4af37; color:#1a1a2e; }
.hh-btn-primary:hover { background:#c4a030; }
.hh-btn-secondary { background:#eee; color:#333; margin-top:10px; }
.hh-btn-secondary:hover { background:#ddd; }
.hh-btn-large { width:100%; padding:14px; font-size:1.1rem; margin-top:10px; }
.hh-btn:disabled { opacity:0.5; cursor:not-allowed; }

/* CONFIRMATION */
.hh-confirmation { text-align:center; padding:60px 20px; }
.hh-confirm-icon { width:80px; height:80px; background:#2ecc71; color:#fff; border-radius:50%; font-size:2.5rem; display:flex; align-items:center; justify-content:center; margin:0 auto 20px; }
.hh-confirmation h3 { color:#0b3b2e; font-size:1.5rem; margin-bottom:10px; }
.hh-confirm-receipt { font-size:0.85rem; color:#888; margin:12px 0 20px; }
.hh-closed-notice, .hh-pause-notice { background:#fff3cd; border:1px solid #ffc107; border-radius:10px; padding:20px; text-align:center; }

/* ===== LEGAL / MARKETING SECTIONS ===== */
.hh-legal-section { background:#f8f9fa; border:1px solid #e9ecef; border-radius:8px; padding:14px 16px; margin-bottom:14px; }
.hh-legal-heading { font-weight:700; font-size:0.95rem; color:#0b3b2e; margin-bottom:8px; }
.hh-checkbox-label { display:flex; align-items:flex-start; gap:8px; font-size:0.88rem; color:#333; cursor:pointer; line-height:1.4; margin-bottom:4px; }
.hh-checkbox-label input[type="checkbox"] { margin-top:3px; width:16px; height:16px; accent-color:#0b3b2e; flex-shrink:0; }
.hh-checkbox-sub { margin-left:24px; }
.hh-marketing-subs { margin-top:6px; }
.hh-legal-small { font-size:0.78rem; color:#999; margin-top:6px; }
.hh-legal-required { background:#fff; border:2px solid #0b3b2e; }

/* PRIVACY / TERMS BOX */
.hh-privacy-box, .hh-terms-box { background:#fff; border:1px solid #ddd; border-radius:6px; padding:14px; margin:10px 0; font-size:0.82rem; color:#555; line-height:1.6; max-height:300px; overflow-y:auto; }
.hh-privacy-box p, .hh-terms-box p { margin-bottom:8px; }
.hh-privacy-box ul, .hh-terms-box ul { margin:8px 0 8px 20px; }
.hh-privacy-box li, .hh-terms-box li { margin-bottom:6px; }
.hh-terms-box h4 { color:#0b3b2e; font-size:0.88rem; margin:12px 0 4px; }
.hh-terms-box h4:first-child { margin-top:0; }

/* FORTRYDELSESRET */
.hh-fortrydelse { font-size:0.78rem; color:#999; text-align:center; margin:8px 0 16px; line-height:1.4; }

/* APPLE PAY / PAYMENT REQUEST */
#hh-payment-request-btn { margin-bottom:10px; min-height:44px; }
.hh-pay-divider { text-align:center; color:#999; font-size:0.85rem; margin:10px 0; position:relative; }
.hh-pay-divider::before, .hh-pay-divider::after { content:''; position:absolute; top:50%; width:40%; height:1px; background:#ddd; }
.hh-pay-divider::before { left:0; }
.hh-pay-divider::after { right:0; }

/* ACCOUNT BAR */
.hh-account-bar { background:#f0f4f0; border-radius:8px; padding:10px 16px; margin-bottom:16px; font-size:0.9rem; display:flex; align-items:center; justify-content:center; gap:6px; }
.hh-account-loggedin { display:flex; align-items:center; gap:8px; }
.hh-account-guest { display:flex; align-items:center; gap:6px; flex-wrap:wrap; justify-content:center; }
.hh-link-btn { background:none; border:none; color:#0b3b2e; text-decoration:underline; font-weight:600; cursor:pointer; font-size:inherit; font-family:inherit; padding:0; }
.hh-link-btn:hover { color:#d4af37; }
.hh-form-error { color:#e74c3c; font-size:0.85rem; min-height:1.2em; margin:6px 0; }
.hh-modal-switch { font-size:0.85rem; text-align:center; margin-top:12px; color:#888; }

/* RESPONSIVE */
@media(max-width:600px){
  .hh-product { flex-wrap:wrap; gap:8px; }
  .hh-add-btns { width:100%; justify-content:flex-end; }
  .hh-cart-bar { flex-direction:column; gap:10px; text-align:center; }
  .hh-modal { padding:18px; max-height:90vh; }
}
