/*
Theme Name: FSM
Description: Child theme for the Avada
Author: Florian Schmidt
Template: Avada
*/
.kachel_button .grow-text {
  flex-grow: 1;
}
.mobile-only {
  display: none !important;
}
/* ==========================================
   1. DASHBOARD: INSERATSVERWALTUNG
========================================== */
.s3m_dashboard_toolbar {
  display: flex;
  margin-bottom: 24px;
}
.s3m_dashboard_create, .s3m_button {
  text-decoration: none;
}
.s3m_dashboard_list {
  width: 100%;
}
.s3m_dashboard_header, .s3m_dashboard_row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px 145px 170px 225px;
  gap: 18px;
  align-items: center;
}
.s3m_dashboard_header {
  padding: 13px 20px;
  margin-bottom: 12px;
  background: #f5f5f3;
  border-radius: 8px;
  font-weight: 600;
}
.s3m_dashboard_row {
  padding: 18px 20px;
  margin-bottom: 14px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 14px rgba(0, 0, 0, .04);
}
.s3m_dashboard_cell {
  min-width: 0;
  overflow-wrap: anywhere;
}
.s3m_dashboard_title {
  font-weight: 600;
}
.s3m_dashboard_label {
  display: none;
}
.s3m_dashboard_row_actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.s3m_dashboard_action {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid currentColor;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  transition: background-color .2s, color .2s;
}
.s3m_dashboard_action_edit {
  color: #719CC5;
}
.s3m_dashboard_action_edit:hover {
  background: #719CC5;
  color: #fff;
}
.s3m_dashboard_action_withdraw {
  color: #EC6704;
}
.s3m_dashboard_action_withdraw:hover {
  background: #EC6704;
  color: #fff;
}
.s3m_dashboard_empty {
  padding: 20px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  text-align: center;
}
/* ==========================================
   2. STATUSANZEIGEN UND MELDUNGEN
========================================== */
.s3hg-status-badge, .s3m_status_badge {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.6;
  font-weight: 600;
}
.s3hg-status-draft, .s3m_status_draft {
  background: #e6f3ff;
  color: #719cc5;
  border-color: #719cc5;
}
.s3hg-status-pending, .s3m_status_pending {
  background: #ffeee1;
  color: #ec6704;
  border-color: #ec6704;
}
.s3hg-status-publish, .s3m_status_publish {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}
.s3hg-status-private, .s3m_status_private {
  background: #dbeafe;
  color: #1e3a8a;
  border-color: #93c5fd;
}
.s3hg-status-rejected, .s3m_status_rejected {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}
.s3hg-rejection-reason, .s3m_rejection_reason {
  margin-top: 8px;
  padding: 8px;
  border-radius: 6px;
  background: #fef2f2;
  font-size: 12px;
  color: #7f1d1d;
}
.s3m_errors {
  border-left: 4px solid #b91c1c;
  padding-left: 10px;
}
.s3m_notice {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 8px;
}
.s3m_notice_success {
  background: #ecfdf5;
  border: 1px solid #86efac;
}
.s3m_notice_error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
}
/* ==========================================
   3. FORMULARE
========================================== */
.s3hg-inserat-form {
  background-color: #fff !important;
  border: 1px solid var(--awb-color4);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, .04);
}
.s3m_input {
  width: 100%;
}
.s3m_group {
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--awb-color5);
  border-radius: 12px;
}
.s3m_group:has(div[style="display: none;"], div[style="display:none;"]) {
  display: none;
}
.s3m_group legend {
  padding: 0 8px;
  font-weight: 700;
  color: var(--awb-color5);
}
.s3m_field_wrap {
  margin-bottom: 12px;
}
textarea, select {
  padding: 8px 15px;
}
input[type="file"] {
  width: 100%;
}
input[type="file"]::file-selector-button, .s3m_form button[type="submit"] {
  display: inline-block;
  padding: 9px 12px;
  margin-right: 12px;
  border: 1px solid #EC6704;
  border-radius: 6px;
  background-color: transparent;
  color: inherit;
  font-family: var(--button_typography-font-family);
  font-weight: var(--button_typography-font-weight);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
input[type="file"]::file-selector-button:hover, .s3m_form button[type="submit"]:hover {
  background: #EC6704;
  color: #fff;
}
/* ==========================================
   4. OEFFENTLICHE INSERATE: FILTER
========================================== */
body.page-id-464 #main {
  padding-inline: max(clamp(15px, 4.1667vw, 60px), calc(12.5vw - 120px), calc((100% - 1920px) / 2)) !important;
}
.s3m_filter_form {
  margin-bottom: 24px;
  padding: 20px;
  border: 1px solid var(--awb-color4);
  border-radius: 10px;
  background: #fff;
}
.s3m_filter_grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 15px;
  align-items: end;
}
.s3m_filter_item label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}
.s3m_filter_item input, .s3m_filter_item select {
  width: 100% !important;
  min-width: 0 !important;
  height: 48px !important;
  border: 1px solid var(--awb-color4) !important;
  border-radius: 8px !important;
  background-color: #fff !important;
  font-family: inherit !important;
  font-size: inherit !important;
}
.s3m_filter_item input:focus, .s3m_filter_item select:focus {
  border-color: var(--awb-color5) !important;
  outline: none;
}
/* Select-Felder */
.s3m_filter_item:has(select) {
  position: relative;
}
/* Standard-Pfeile entfernen */
.s3m_filter_item select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  padding-right: 40px !important;
}
/* Font-Awesome-Chevron */
.s3m_filter_item:has(select)::after {
  content: "\f078";
  position: absolute;
  right: 16px;
  bottom: 24px;
  transform: translateY(50%);
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 12px;
  color: var(--awb-color5);
  pointer-events: none;
}
.s3m_filter_actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  gap: 8px;
}
.s3m_filter_actions a {
  font-weight: 600;
}
.s3m_filter_actions button {
  min-height: 48px;
  padding: 9px 20px;
  border: var(--button_border_width-top) solid var(--button_border_color);
  border-radius: var(--button-border-radius-top-left);
  background: var(--button_gradient_top_color);
  color: var(--button_accent_color);
  font-family: var(--button_typography-font-family);
  font-weight: var(--button_typography-font-weight);
  font-size: var(--button_font_size);
  cursor: pointer;
  transition: all .2s ease;
}
.s3m_filter_actions button:hover {
  background: var(--button_gradient_top_color_hover);
  color: var(--button_accent_hover_color);
}
/* Icons für Filter-Aktionen */
.s3m_filter_actions button::before, .s3m_filter_actions a::before {
  display: inline-block;
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  margin-right: 8px;
}
/* Filter-Icon */
.s3m_filter_actions button::before {
  content: "\f0b0";
}
/* Zurücksetzen-Icon */
.s3m_filter_actions a::before {
  content: "\f2ea";
}
/* ==========================================
   5. OEFFENTLICHE INSERATE: KACHELN
========================================== */
.s3m_cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.s3m_card {
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
}
.s3m_card_link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.s3m_card_image img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.s3m_card_image_placeholder {
  display: flex;
  height: 180px;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  color: #64748b;
}
.s3m_card_body {
  padding: 12px;
}
.s3m_card_type {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--awb-custom_color_1);
  text-transform: uppercase;
}
.s3m_card_title {
  margin: 0 0 20px;
  font-size: var(--h4_typography-font-size) !important;
  line-height: 1.2 !important;
  color: var(--awb-color5) !important;
  overflow-wrap: break-word;
}
.s3m_card_meta {
  margin: 0 0 6px;
  font-size: 14px;
}
.s3m_card_excerpt {
  margin: 10px 0;
  color: #374151;
  font-size: 14px;
}
.s3m_card_date {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}
.s3m_empty {
  padding: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
}
/* ==========================================
   5.5 INSERAT DETAIL
========================================== */
/* Inseratsdetails über die gesamte Breite */
body.single-s3_inserat .post-content > .s3m-inserat-details {
  grid-column: 1 / -1;
  width: 100%;
}
/* Hellgrauer Hintergrund für Inseratsdetailseiten */
body.single-s3_inserat #main {
  background-color: #f5f5f5;
}
/* Allgemeine Informationen auf Bildhöhe strecken */
.s3m-inserat-details .s3m-inserat-group-general {
  height: 100%;
}
/* Anlauftext und Zurück-Button nebeneinander */
body.single-s3_inserat .post-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 30px;
}
/* Zurück-Link als schlichter Textlink */
.s3m-inserat-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--awb-color5);
  text-decoration: none;
  white-space: nowrap;
}
.s3m-inserat-back:hover {
  color: var(--awb-custom_color_1);
}
.s3m-inserat-back i {
  font-size: 0.9em;
}
body.single-s3_inserat .entry-title {
  line-height: 1.2 !important;
}
/* Smartphone */
@media (max-width: 767px) {
  body.single-s3_inserat .post-content {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 15px;
  }
  .s3m-inserat-back {
    justify-self: start;
  }
}
/* ==========================================
   6. PAGINATION
========================================== */
.s3m_pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}
.s3m_pagination li {
  margin: 0;
}
.s3m_pagination a, .s3m_pagination span {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  text-decoration: none;
}
.s3m_pagination .current {
  background: #111827;
  color: #fff;
  border-color: #111827;
}
/* ==========================================
   ANMELDUNG / REGISTRIERUNG
========================================== */
.um-login, .um-register, .konto-dialog {
  background: var(--awb-color1);
  padding: 30px;
  border-radius: 15px;
  border: 1px solid var(--awb-color5);
}
.um-login input, .um-register input, .konto-dialog input {
  border-radius: 8px !important;
}
.um-register .um-col-1 {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}
.um-register .um-col-1 > div:first-child {
  flex: 0 0 100%;
}
.um-register .um-col-1 > div:not(:first-child) {
  flex: 0 0 48%;
}
.um .um-form .um-button {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 9px 20px !important;
  border: var(--button_border_width-top) solid var(--button_border_color) !important;
  border-radius: var(--button-border-radius-top-left) !important;
  background: linear-gradient(var(--awb-custom_color_2), var(--awb-custom_color_1)) !important;
  color: #fff !important;
  font-family: var(--button_typography-font-family) !important;
  font-weight: var(--button_typography-font-weight) !important;
  font-size: var(--button_font_size) !important;
  cursor: pointer;
  transition: all .2s ease;
}
.um .um-form .um-button:hover {
  background: linear-gradient(var(--awb-custom_color_1), var(--awb-custom_color_2)) !important;
}
.konto-dialog h3 {
  margin-top: 0px !important;
}
.konto-dialog .fusion-button-wrapper {
  display: block!important;
}
/* ==========================================
   7. RESPONSIVE: MEDIUM DEVICES
   Bis 1179px
========================================== */
@media (max-width: 1179px) {
  .mobile-only {
    display: block !important;
  }
  .desktop-only {
    display: none !important;
  }
  #menu-item-537.menu-logout .menu-text {
    font-size: var(--awb-font-size)!important;
  }
  .s3m_dashboard_header {
    display: none;
  }
  .s3m_dashboard_row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 16px;
    align-items: start;
  }
  .s3m_dashboard_title {
    grid-column: 1;
    grid-row: 1;
    font-size: 18px;
  }
  .s3m_dashboard_status {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
  }
  .s3m_dashboard_type, .s3m_dashboard_date {
    grid-column: 1 / -1;
  }
  .s3m_dashboard_row_actions {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    padding-top: 14px;
    border-top: 1px solid #eee;
  }
  .s3m_cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .s3m_filter_grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .s3m_filter_actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    align-items: center;
    margin-top: 10px;
  }
  .s3m_filter_actions button {
    width: 100%;
  }
  .s3m_filter_actions a {
    width: 100%;
    text-align: center;
  }
}
/* ==========================================
   8. RESPONSIVE: SMALL DEVICES
   Bis 767px
========================================== */
@media (max-width: 767px) {
  .s3m_dashboard_toolbar {
    justify-content: stretch;
  }
  .s3m_dashboard_create {
    width: 100%;
    text-align: center;
  }
  .s3m_dashboard_row {
    padding: 16px;
  }
  .s3m_dashboard_row_actions .s3m_dashboard_action {
    flex: 1 1 100%;
  }
  .s3m_cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .s3m_filter_grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .s3m_filter_actions {
    grid-column: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
  }
    .um-login, .um-register, .konto-dialog {
    padding: 15px;
}
  .um-login, .um-register {
    padding: 15px;
  }
  .um-register .um-col-1 > div:not(:first-child) {
    flex: 0 0 100%;
  }
}
/* ==========================================
   9. RESPONSIVE: EXTRA SMALL DEVICES
   Bis 640px
========================================== */
@media (max-width: 640px) {
  .s3m_dashboard_row {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .s3m_dashboard_status {
    grid-column: 1;
    grid-row: 1;
    text-align: left;
  }
  .s3m_dashboard_title {
    grid-column: 1;
    grid-row: 2;
  }
  .s3m_dashboard_type {
    grid-column: 1;
    grid-row: 3;
  }
  .s3m_dashboard_date {
    grid-column: 1;
    grid-row: 4;
  }
  .s3m_dashboard_row_actions {
    grid-column: 1;
    grid-row: 5;
  }
}