/* =========================================
   BASE
   ========================================= */
* {
  box-sizing: border-box;
}

:root {
  --max-width: 2000px;
  --page-pad: 50px;
  --border: #d0d0d0;
  --muted: #777;
  --bg-soft: #F5F4F5;
  --card-bg: #fff;

  --brand: #FD8C3A;
  --brand-hover: #E67300;

  --secondary: #6B7280;
  --secondary-hover: #4B5563;

  --ok: #1fd21f;
  --bad: #f44336;

  --gap: 20px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "avenir next", avenir, "segoe ui", "helvetica neue", Adwaita Sans, Cantarell, Ubuntu, roboto, noto, helvetica, arial, sans-serif;
  /* display: flex;
  flex-direction: column;
  align-items: center; */
  margin: 0;
  min-height: 100vh;
}

/* =========================================
   LAYOUT
   ========================================= */
.topbar {
  width: 100%;
  height: 100px;
  background-color: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* padding: 10px 0; */
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  width: 100%;
  max-width: var(--max-width);
  padding: 0 var(--page-pad);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar .logo {
  height: 35px;
}

.content {
  margin: 20px auto 0;
  flex: 1;
  max-width: var(--max-width);
  /* width: 100%; */
  padding: 0 var(--page-pad);
}

footer {
  padding: 20px;
  width: 100%;
  text-align: center;
  margin: 0 auto;
}

/* Flex columns (Search page uses this) */
.flexrow {
  display: flex;
  gap: var(--gap);
  align-items: flex-start;
}

.content-center {
  gap: 80px;
}

.flexcell {
  flex-grow: 1;
}

.flexcell:first-child {
  flex-grow: 3;
}

/* --- Stabil højre kolonne --- */
.flexrow .flexcell:last-child {
  flex: 0 0 520px;
  /* justér (480-600) til du rammer billede 1 */
  min-width: 420px;
}

.flexrow .flexcell:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

/* Panel + box skal fylde kolonnen */
#basket-panel,
.order-box {
  width: 100%;
}

/* =========================================
   UTILITIES (spacing)
   ========================================= */
.mt-1 {
  margin-top: .5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.mt-4 {
  margin-top: 2rem;
}

.mt-5 {
  margin-top: 3rem;
}

.mb-1 {
  margin-bottom: .5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.mb-5 {
  margin-bottom: 3rem;
}

.full {
  width: 100%;
}

/* =========================================
   COMPONENTS: Buttons
   ========================================= */
.button {
  color: #000;
  text-decoration: none;
  padding: 10px 15px 10px 15px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background-color: var(--card-bg);
  display: flex;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

.btn-order {
  min-width: 170px;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  padding: 12px;
  font-size: 16px;
  min-height: 48px;
}

.btn-search {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.btn-search:hover {
  background-color: var(--brand-hover);
  border-color: var(--brand-hover);
  color: #fff;
}

.btn-secondary {
  border-color: var(--secondary);
}

.btn-secondary:hover {
  
  border-color: var(--secondary-hover);
  
}

button.remove {
  background-color: var(--brand);
  border: 1px solid var(--brand);
  color: #fff;
  font-weight: 700;
  padding: 6px 12px;
  font-size: .85rem;
}

button.remove:hover {
  background-color: var(--brand-hover);
  border-color: var(--brand-hover);
  color: #fff;
}

/* Trash button – icon only */
button.trashbag {
  background: transparent;
  border: none;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* SVG farver (dine svg bruger fill/stroke sort – så vi holder det sort/grå) */
button.trashbag svg {
  width: 18px;
  height: 18px;
}

button.trashbag:hover {
  background: transparent;
  opacity: .85;
  /* lille feedback uden bg */
}



/* Icon + text */
.icon-text {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  line-height: 1;
}

.icon-text i {
  font-size: 1.2em;
}

/* =========================================
   HTMX loading / spinner
   ========================================= */
.default-text,
.loading-text {
  display: flex;
  text-transform: uppercase;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.loading-text {
  display: none;
  white-space: nowrap;
}

.htmx-request .default-text {
  display: none;
}

.htmx-request .loading-text {
  display: flex;
}

.spinner {
  display: inline-block;
  width: 26px;
  height: 26px;
  border: 3px solid rgba(255, 255, 255, .3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* =========================================
   SEARCH (domain search page)
   ========================================= */
.domain-search-form {
  width: 100%;
}

.search-label {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: .4rem;
}

input.search {
  color: #000;
  text-decoration: none;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background-color: var(--card-bg);
}

.search-row {
  display: flex;
  flex-wrap: nowrap;
  gap: .5rem;
}

.search-row input {
  flex: 1;
  min-width: 0;
}

.search-row button {
  flex: 0 0 auto;
  white-space: nowrap;
  text-transform: uppercase;
}

.search-results {
  margin-top: 20px;
}

.search-error {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 1rem;
  padding: 14px 16px;
  border: 1px solid var(--bad);
  border-left: 6px solid var(--bad);
  border-radius: 6px;
  background-color: #fff5f5;
  color: #b71c1c;
  font-size: .95rem;
  line-height: 1.4;
}

.search-error strong {
  font-weight: 700;
}

.search-error ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.search-error li {
  margin: 2px 0;
}

/* Domain result tables */
.domain-table {
  width: 100%;
  border-collapse: collapse;
}

.domain-table th,
.domain-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
  text-align: left;
}

.domain-table.highlight {
  border: 2px solid var(--ok);
  margin-bottom: 20px;
}

.domain-table tr.taken {
  background: #e0e0e0;
  border-bottom: 1px solid #c0c0c0;
}

.domain-table tr.selected {
  background: rgba(0, 0, 0, .02);
}

.status.ok {
  color: var(--ok);
  font-weight: 600;
}

.status.bad {
  color: red;
  font-weight: 600;
}

/* ===== Bestilling box ===== */
.order-box {
  border: 1px solid rgba(10, 10, 10, 0.12);
  border-radius: 12px;
  padding: 14px;
}

.order-box__header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}

.order-box__sub {
  font-size: 0.85rem;
  opacity: 0.75;
}

/* Gør bestillingslisten mere kompakt */
.order-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(10, 10, 10, 0.08);
  border-radius: 10px;
}

.order-line__name {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.1;
}

.order-line__meta {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 2px;
}

.order-line__price {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: right;
}

.order-line__remove {
  display: inline-block;
  margin-top: 2px;
  font-size: 0.8rem;
  opacity: 0.75;
  text-decoration: underline;
}
/* 2) order-foot skal starte HELT lige under tabellen */
.order-foot{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 3) footnote skal flugte med tabellens indhold og ligge tæt på linjen */
.order-foot .checkout-footnote{
  align-self: flex-end;
  padding: 10px 1rem 0;
  margin: 0;
}



/* ===== Empty state + DB boxes ===== */
.empty-state__title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.empty-state__text {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* afstand mellem bokse */
.pick-flex {
  gap: 18px;
}

/* orange ramme på hver boks */
.pick-box {
  border: 1px solid var(--brand);
  border-radius: 4px;
  background: #fff;
  padding: 0;
  /* vi lægger luft på pick-item */
  margin-bottom: 10px;
}

/* fjern "grid-look" / 50% cards i tom-state */
.pick-items {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
}

/* sørg for at der kun er én "card" der fylder hele boksen */
.pick-item {
  flex: 1 1 100%;
  border: 0;
  /* border er på pick-box */
  border-radius: 0;
  padding: 22px 18px;
  min-height: 92px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* titel styling */
.pick-item__name {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
  color: #111;

  /* plads til dot */
  position: relative;
  padding-left: 10px;
}

/* dot foran titlen */
.pick-item__name::before {
  content: ".";
  position: absolute;
  left: 4px;
  top: 0;
  color: var(--brand);
  font-weight: 900;
}

/* "Fra ..." / pris-linje */
.pick-item__meta {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 700;
  color: #111;

  /* override din gamle grå/opacity */
  opacity: 1;
}

/* =========================================
   CARDS
   ========================================= */
.card {
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 15px;
  background-color: var(--card-bg);
  width: 100%;
}

.card-darker {
  background-color: #F9F9F9;
}

/* =========================================
   CHECKOUT / ORDER
   ========================================= */
.order-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 18px 18px;
}


.order-section {
  padding: 14px 0;
}

.order-section:not(:last-child) {
  border-bottom: 1px solid #eee;
}


.order-domain-block {
  border: 1px solid rgba(10, 10, 10, .08);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
  background-color: rgba(10, 10, 10, .02);
}

.order-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  margin-bottom: 10px;
  border: none;
  background: transparent;
  border-radius: 0;
}


.order-section-title {
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: .3px;
  color: #222;
}

.order-section-title-addon {
  font-size: 0.8rem;
  font-weight: 800;
}

/* Domæne navn */
.order-section-domain {
  font-size: .95rem;
  font-weight: 800;
  color: #111;
}

/* Prisrækker: label venstre, pris højre – pæne linjer */
.order-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 8px;
  margin: 0;
}

.order-row,
.order-section-addons {
  padding-left: 6px;
  padding-right: 6px;
}

.order-row>span:first-child {
  color: #333;
  font-size: .92rem;
}

.order-price {
  font-weight: 700;
  font-size: .92rem;
  color: #111;
  min-width: 110px;
  text-align: right;
}

.order-section-addons {
  margin-top: 14px;
  padding: 6px 8px 8px 8px;
}

.addons-panel {
  margin-bottom: 16px;
}

/* Fix selector scope (previously also hit ALL h3 on the page) */
.addons-panel p,
.addons-panel h3 {
  margin: 0;
}

/* Addon list items */
.addon-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

/* Dropdown */
.dropdown-form {
  width: 100%;
  max-width: 245px;
  padding: 10px 12px;
  background-color: rgba(10, 10, 10, .01);
  border: 1px solid rgba(10, 10, 10, .15);
  margin-bottom: 15px;
}

.dropdown-form-checkout {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(10, 10, 10, .15);
  background-color: #fff;
  margin-bottom: 15px;
}


/* “Ingen tilkøb valgt” lidt mere diskret */
.addons-empty {
  margin-top: 8px;
  font-size: .9rem;
  color: var(--muted);
}

/* =========================================
   ORDER TOTALS
========================================= */

/* Totals */
.order-total {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
}

.order-total-inner {
  text-align: right;
}

.order-total-row {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  margin: .15rem 0;
  font-size: .95rem;
}

.order-total-label,
.order-total-label-final {
  min-width: 140px;
}

.order-total-value,
.order-total-value-final {
  min-width: 80px;
  text-align: right;
  white-space: nowrap;
}

.order-total-row-final {
  margin-top: .6rem;
  font-weight: 700;
}

.order-total-label-final {
  font-size: 1.1rem;
}

.order-total-value-final {
  font-size: 1.2rem;
  color: var(--brand);
  border-bottom: 3px double var(--brand);
  padding-bottom: .1rem;
}

/* Checkout footnote */
.checkout-footnote {
  margin: 0 0 0.9rem;
  font-size: .8rem;
  color: var(--muted);
}

/* Buttons row */
.checkout-buttons {
  display: flex;
  gap: 10px;
  margin-top: 1.5rem;
}
.checkout-buttons > form{
  display: inline-flex;
  margin: 0;
}

.checkout-buttons > form:has(.btn-search),
.checkout-buttons > a.btn-search,
.checkout-buttons .btn-search{
  margin-left: auto;
}

.checkout-buttons .button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

/* =========================================
   FORMS (checkout)
   ========================================= */
.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.form-field {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
}

.form-field-narrow {
  flex: 0 0 140px;
}

.form-field-full {
  flex: 1 1 100%;
}

.checkout-form label {
  margin-bottom: .25rem;
  font-weight: 600;
}

.checkout-form input {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.form-button-wrapper {
  display: flex;
  gap: 10px;
}

.form-button-wrapper form {
  margin: 0;
  padding: 0;
  display: inline-block;
}

/* =========================================
   FLASH MESSAGES
   ========================================= */
.flash-static {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 16px 24px;
  color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
  text-align: center;
  min-width: 300px;
  max-width: 500px;
  font-weight: 500;
}

.flash-success {
  background-color: #4CAF50;
}

.flash-warning {
  background-color: #FF9800;
}

.flash-error {
  background-color: var(--bad);
}

.flash-info {
  background-color: #2196F3;
}

.flash-fade {
  animation: fadeInOut 8s ease-in-out forwards;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }

  10% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  90% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
    pointer-events: none;
  }
}

/* =========================================
   BASKET TABLE (right column on search)
   ========================================= */
.basket-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 0;
}

.basket-table td:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.basket-table thead {
  background-color: #f5f5f5;
}

.basket-table th {
  padding: .75rem 1rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #ddd;
}

.basket-table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid #eee;
}

.basket-table tbody tr:hover {
  background-color: #f9f9f9;
}

.price-cell {
  text-align: left;
  font-weight: 500;
}

.action-cell {
  text-align: right;
  width: 100px;
}

.domain-label {
  font-weight: 500;
  color: #333;
}

/* =========================================
   SMALL QUALITY-OF-LIFE
   ========================================= */
.basket-status {
  margin: 10px 0 20px;
  font-weight: 600;
  color: #2e7d32;
}


.btn-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  flex: 0 0 auto;
}

/* venstregruppe (trash + navn) */
.addon-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  /* padding-left: 12px; */
  min-width: 0;
}

/* TRASH før teksten (uden at ændre HTML) */
.addon-item-left .addon-remove-form {
  order: 0;
}

.addon-item-left .addon-name {
  order: 1;
}

/* pris helt ude til højre */
.addon-price {
  margin-left: auto;
  font-weight: 700;
  white-space: nowrap;
}

