/* -------------------------------------------------------------
   BSDMP ZIP Searchbox – FINAL COMPLETE VERSION
   Desktop: Button immer rechts
   Mobile: Button rechts ODER unten (per Option)
-------------------------------------------------------------- */

/* ===== ROOT VARIABLES ===== */
:root {
  --bsdmp-input-height: 2.5rem;
  --bsdmp-icon-width: 2.8rem;

  --bsdmp-btn-bg: #000000;
  --bsdmp-btn-bg-hover: #333333;

  --bsdmp-input-bg: #fafafa;
  --bsdmp-input-bg-hover: #f3f3f3;
  --bsdmp-input-bg-focus: #f0f0f0;
  --bsdmp-input-text: #333333;
  --bsdmp-input-placeholder: #999999;

  --bsdmp-border-radius-input: 12px;
  --bsdmp-border-radius-button: 12px;
  --bsdmp-input-button-gap: 0px;

  --bsdmp-btn-icon-size: 1.25rem;
}

/* -------------------------------------------------------------
   WRAPPER (Desktop Basis)
-------------------------------------------------------------- */

.bsd-searchbox {
  display: flex;
  flex-direction: row; /* DESKTOP: Button IMMER rechts */
  width: 100%;
  max-width: 550px;
  margin: 0 auto;
  font-family: var(--e-global-typography-text-font-family, system-ui, sans-serif);
  border: 1px solid #e6e6e6;
  border-radius: var(--bsdmp-border-radius-input);
  background: #fff;
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
}

/* -------------------------------------------------------------
   INPUT AREA
-------------------------------------------------------------- */

.bsd-input-wrapper {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  background: var(--bsdmp-input-bg);
  transition: background 0.25s ease;
  padding: 0;
}

.bsd-input-wrapper:hover {
  background: var(--bsdmp-input-bg-hover);
}

/* Icon links */
.bsd-icon {
  width: var(--bsdmp-icon-width);
  flex: 0 0 var(--bsdmp-icon-width);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
}

/* Clear-X rechts */
.bsd-clear-btn {
  width: var(--bsdmp-icon-width);
  flex: 0 0 var(--bsdmp-icon-width);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: none;
  cursor: pointer;
  opacity: 0.35;
  padding: 0;
  color: var(--e-global-color-82a70ce) !important;
}

.bsd-clear-btn:hover {
	background-color: #f7f7f7 !important;
	opacity: 0.9;
	min-height: 100%;}

.bsd-clear-icon {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Input */
.bsd-input {
  flex: 1 1 auto;
  height: var(--bsdmp-input-height);
  font-size: 1rem !important;
  padding: 0;
  margin: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--bsdmp-input-text);
}

.bsd-input::placeholder {
  font-size: 0.875rem;
  color: var(--bsdmp-input-placeholder);
}

.bsd-input:focus {
  background: var(--bsdmp-input-bg-focus);
}

/* -------------------------------------------------------------
   BUTTON
-------------------------------------------------------------- */

.bsd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.6rem;
  margin: 0;
  height: var(--bsdmp-input-height);
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  background: var(--bsdmp-btn-bg);
  color: #fff !important;
  transition: background 0.25s ease, opacity 0.25s ease;
}

.bsd-btn:not(:disabled):hover {
  background: var(--bsdmp-btn-bg-hover);
}

.bsd-btn:disabled {
  background: #d2d2d2 !important;
  opacity: 0.5;
  cursor: not-allowed;
}

/* -------------------------------------------------------------
   BUTTON ICONS
-------------------------------------------------------------- */

.bsd-btn-label {
  display: inline-block;
}

.bsd-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bsd-btn-icon-svg {
  width: var(--bsdmp-btn-icon-size);
  height: var(--bsdmp-btn-icon-size);
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  display: block;
}

.bsd-btn-icon + .bsd-btn-label {
  margin-left: 0.5rem;
}

.bsd-btn-label + .bsd-btn-icon {
  margin-left: 0.5rem;
}

/* -------------------------------------------------------------
   MOBILE (max-width: 767px)
-------------------------------------------------------------- */

@media (max-width: 767px) {

  /* Iconstreifen identisch breit */
  .bsd-icon,
  .bsd-clear-btn {
    width: var(--bsdmp-icon-width);
    flex: 0 0 var(--bsdmp-icon-width);
  }

  .bsd-input {
    height: var(--bsdmp-input-height);
  }

  .bsd-btn {
    height: var(--bsdmp-input-height);
  }

  /* =====================================================
     MOBILE LAYOUT VARIANTEN  
     (werden NUR mobil angewendet)
     ===================================================== */

  /* MOBILE: Button unten */
  .bsd-btn-bottom {
    flex-direction: column;
  }

  .bsd-btn-bottom .bsd-btn {
    width: 100%;
  }

  /* MOBILE: Button rechts */
  .bsd-btn-right {
    flex-direction: row;
  }

  .bsd-btn-right .bsd-btn {
    width: auto;
  }
}
