/* =========================================================
   dit is voor de algemene link fucnties
========================================================= */

/* =========================================================
   GENERIC MODALS (Supplier side)
   Matches LINK COMMERCE futuristic theme
========================================================= */

.page-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 20px;
}

/* ACTION BUTTON ROW */
.actions-row {
    display: flex;
    gap: 12px;
    margin-bottom: 26px;
}

/* TABLE CARD */
.card-block {
    background: white;
    padding: 22px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

/* NICE TABLE */
.nice-table {
    width: 100%;
    border-collapse: collapse;
}

.nice-table th {
    text-align: left;
    padding: 12px 10px;
    background: var(--primary-soft);
    font-weight: 700;
    color: var(--primary-dark);
    border-bottom: 1px solid var(--border);
}

.nice-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.nice-table tr:hover {
    background: var(--primary-soft);
}

/* TABLE ACTION BUTTONS */
.table-actions {
    display: flex;
    gap: 8px;
}

/* BUTTONS */
.btn-primary {
    background: var(--primary);
    padding: 10px 16px;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--border);
    padding: 10px 16px;
    color: var(--text-main);
    border-radius: 12px;
    border: none;
    cursor: pointer;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 12px;
    cursor: pointer;
}

.btn-info {
    background: #149735;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 12px;
    cursor: pointer;
}
.btn-warning {
    background: #ffc107;
    color: black;
    border: none;
    padding: 10px 16px;
    border-radius: 12px;
    cursor: pointer;
}

.btn-small {
    padding: 6px 10px !important;
}

/* ---------------------------------------------------------
   MODAL SYSTEM
--------------------------------------------------------- */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(3px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.modal-overlay.open {
    display: flex;
}

.modal-card {
    width: 90%;
    max-width: 700px;
    background: white;
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    animation: modalIn 0.25s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    background: white;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 12px;
    cursor: pointer;
}

.modal-body {
    max-height: 60vh;
    overflow-y: auto;
    margin-bottom: 14px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Filter Row */
.modal-filter-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.modal-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
}

/* PRODUCT LIST INSIDE MODAL */
.modal-product-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-product-list .product-item,
.modal-product-list .available-product-item {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
}

.product-item label,
.available-product-item label {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
}

.product-name {
    font-weight: 600;
}

.product-price,
.product-stock,
.product-uom {
    font-size: 12px;
    color: var(--text-muted);
}


.search-bar {
    margin-bottom: 20px;
}

.search-form {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    background: white;
}

/* ---------------------------------------------------------
   PAGINATION (matches webshop theme)
--------------------------------------------------------- */

.pagination-bar {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pagination-btn {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 13px;
    color: var(--text-main);
    transition: 0.15s ease;
}

.pagination-btn:hover {
    background: var(--primary);
    color: white;
}

.pagination-number {
    padding: 8px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
}

.pagination-number:hover {
    background: var(--primary-soft);
}

.pagination-number.active {
    background: var(--primary);
    color: white;
    font-weight: 700;
    border-color: var(--primary-dark);
}

.pagination-dots {
    padding: 8px 10px;
    color: var(--text-muted);
}

.form-input {
    width: 100%;
    background: white;
    border: 1px solid #d3d9e4;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 15px;
    color: #1d2b53;
    outline: none;
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: #2b6fff;
    box-shadow: 0 0 0 3px rgba(43, 111, 255, 0.2);
}

/* Mapped Dealers Badge Box */
.dealer-badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: #f8faff;
    border: 1px solid #d8e1f0;
    border-radius: 12px;
    min-height: 48px;
}

/* Individual Dealer Badge */
.dealer-badge {
    background: #e8f0ff;
    color: #1d2b53;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #c5d8ff;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.connection-popover {
    position: absolute;
    top: 50%;
    left: calc(100% + 12px);
    transform: translateY(-50%);
    background: white;
    border-radius: 12px;
    padding: 8px 14px;
    font-size: 13px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border);
    display: none;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    z-index: 50;
}

.connection-popover.show {
    display: flex;
    animation: popIn 0.15s ease;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

/* Status colors */
.connection-ok {
    color: #166534;
    background: #dcfce7;
    border-color: #86efac;
}

.connection-error {
    color: #991b1b;
    background: #fee2e2;
    border-color: #fca5a5;
}

.connection-loading {
    color: var(--text-muted);
}

.option-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.option-drag {
    cursor: grab;
    font-size: 16px;
    color: var(--text-muted);
    user-select: none;
    padding: 0 4px;
}

.option-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.option-form .form-input {
    flex: 1;
}

.option-form .price-input {
    width: 90px;
    flex: 0 0 auto;
}

.checkout-page {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

.checkout-title {
    font-size: 26px;
    margin-bottom: 10px;
}

.supplier-title {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-strong);
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.checkout-item:last-child {
    border-bottom: none;
}

.checkout-item-name {
    font-weight: 500;
}

.checkout-item-meta {
    font-size: 13px;
    color: var(--text-muted);
}

.checkout-total {
    text-align: right;
    font-size: 16px;
    font-weight: bold;
    margin-top: 10px;
}

.final-checkout-btn {
    width: 100%;
    margin-top: 30px;
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
}

.final-checkout-btn:hover {
    opacity: 0.9;
}

/* ==========================================
   BOOLEAN TOGGLE — MINIMAL
========================================== */

.boolean-toggle {
    display: inline-flex;
    align-items: center;
}

.boolean-switch {
    position: relative;
    width: 48px;
    height: 26px;
}

.boolean-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.boolean-slider {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,#e2e8f0,#cbd5e1);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.15);
}

.boolean-slider::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 3px;
    left: 3px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 6px 14px rgba(15,23,42,0.35);
    transition: transform 0.2s ease;
}

/* ON */
.boolean-switch input:checked + .boolean-slider {
    background: linear-gradient(
        135deg,
        var(--primary),
        var(--primary-dark)
    );
}

.boolean-switch input:checked + .boolean-slider::before {
    transform: translateX(22px);
}

/* Hover polish */
.boolean-slider:hover {
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.2),
                0 6px 14px rgba(15,23,42,0.12);
}

/* =========================================================
   CHECKOUT – DELIVERY ADDRESS
========================================================= */

.checkout-address {
    background: var(--glass);
    backdrop-filter: blur(18px);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    margin-bottom: 26px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(148,163,184,0.35);
}

.checkout-address h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-main);
}

/* Select dropdown */
.checkout-address select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: white;
    font-size: 14px;
    box-shadow: var(--shadow-light);
    outline: none;
    transition: 0.15s ease;
    margin-bottom: 14px;
}

.checkout-address select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}


/* Save address toggle */
.save-address {
    grid-column: span 2;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
    cursor: pointer;
}

.save-address input {
    accent-color: var(--primary);
    cursor: pointer;
}

/* Mobile */
@media (max-width: 600px) {
    #deliveryAddressFields {
        grid-template-columns: 1fr;
    }

    #delivery_street,
    #delivery_country {
        grid-column: span 1;
    }
}

.pm-add-btn.disabled,
.pm-add-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

input[disabled] {
    background: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.8;
}

    .hero-banner {
      position: relative;
      color: var(--hero-text-color);
      border-radius: var(--hero-radius);
      padding: clamp(40px, 6vw, 72px);
      display: flex;
      align-items: center;
      align-items: flex-end;
      padding-bottom: 20px;
      

      /* IMAGE OR GRADIENT (handled via Jinja) */
      {% if branding.homepage.hero_image %}
        background-image: url('{{ url_for("static", filename=branding.homepage.hero_image) }}');
      {% else %}
        background: linear-gradient(
          90deg,
          var(--hero-gradient-start),
          var(--hero-gradient-end)
        );
      {% endif %}

      background-size: cover;
      background-position: center;
      background-repeat: no-repeat;

      /* RESPONSIVE HEIGHT */
      min-height: clamp(360px, 50vh, 250px);
    }

    .hero-cta {
      margin-top: 32px;
    }

    .hero-btn {
      display: inline-block;
      padding: 14px 28px;
      font-size: 15px;
      font-weight: 600;
      border-radius: 999px;
      text-decoration: none;

      background-color: var(--brand-accent);
      color: #ffffff;

      transition: all 0.25s ease;
      box-shadow: 0 10px 24px rgba(0,0,0,0.15);
    }

    .hero-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 14px 32px rgba(0,0,0,0.18);
      opacity: 0.95;
    }
    .hero-banner img {
      max-width: 280px;
      border-radius: 12px;
    }

    .promo-row {
      display: flex;
      gap: 18px;
      margin-top: 20px;
      flex-wrap: wrap;
    }
    .promo-card {
      flex: 1;
      min-width: 220px;
      background: #e9f3ff;
      border-radius: 12px;
      padding: 20px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .promo-card h3 {
      margin: 0 0 5px 0;
      font-size: 15px;
      font-weight: 700;
    }
    .promo-card p {
      margin: 0;
      font-size: 13px;
      color: #333;
    }
    .promo-icon {
      font-size: 32px;
      opacity: 0.8;
    }
    .info-banner {
      background: #fff5c2;
      border-radius: 12px;
      padding: 14px 22px;
      font-size: 14px;
      display: flex;
      align-items: center;
      margin: 30px 0;
    }
    .info-banner span {
      margin-right: 10px;
      font-size: 20px;
    }
      .info-section {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    margin: 50px 0;
    align-items: center;
  }

  .info-section h2 {
    font-size: 26px;
    margin-bottom: 14px;
  }

  .info-section p {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 14px;
  }

  .info-points {
    margin-top: 16px;
  }

  .info-points li {
    margin-bottom: 8px;
    font-size: 14px;
  }

  .info-visual {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .info-visual img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
  }

  .marketing-section {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  align-items: center;
  margin: 90px 0;
}

.marketing-section.reverse {
  grid-template-columns: 0.9fr 1.1fr;
}

.marketing-section.reverse .marketing-text {
  order: 2;
}
.marketing-section.reverse .marketing-visual {
  order: 1;
}

.marketing-text h2 {
  font-size: 30px;
  margin-bottom: 18px;
  line-height: 1.25;
}

.marketing-text p {
  font-size: 16px;
  line-height: 1.7;
  color: #333;
  max-width: 520px;
}

.marketing-visual img {
  width: 75%;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: none;
}

.founders-visual {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.founder-card {
  text-align: center;
}

.founder-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.founder-name {
  margin-top: 10px;
  font-weight: 600;
  font-size: 14px;
}

.founder-role {
  font-size: 13px;
  color: #555;
}
