/* Basis-Styles für das Deal-Widget */
#deal-widget {  
  font-family: Arial, sans-serif;
  max-width: 600px;
  margin: auto;
  text-align: center;
  padding: 1em;
}

#deal-widget input {
  padding: 10px;
  width: 80%;
  border: 1px solid #ccc;
  border-radius: 5px;
  display: block;
  margin: 0.5em auto;
}

#deal-widget button {
  padding: 10px 15px;
  border: none;
  background: #0073e6;
  color: white;
  cursor: pointer;
  border-radius: 5px;
  margin-bottom: 10px;
}

/* Tabelle in einer responsiven Box */
.table-responsive {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

table th,
table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: center;
}

table th {
  background-color: #f5f5f5;
  font-weight: bold;
}

table tr:hover {
  background: #f0f0f0;
}

/* Responsive Tabelle: Kartenlayout auf kleinen Bildschirmen */
@media only screen and (max-width: 600px) {
  table thead {
    display: none;
  }
  table, tbody, tr, td {
    display: block;
    width: 100%;
  }
  table tr {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
  }
  table td {
    text-align: right;
    padding-left: 50%;
    position: relative;
    border: none;
    border-bottom: 1px solid #eee;
  }
  table td:last-child {
    border-bottom: 0;
  }
  table td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    width: 45%;
    padding-right: 10px;
    font-weight: bold;
    text-align: left;
  }
}

/* Modal-Styles */
#deal-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-container {
  background: #fff;
  padding: 20px;
  width: 80%;
  max-width: 600px;
  border-radius: 5px;
  position: relative;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-title {
  margin-top: 0;
  margin-bottom: 15px;
  text-align: center;
  font-size: 1.5rem;
}

/* Modal Tabs */
.modal-tabs {
  display: flex;
  justify-content: center;
  border-bottom: 1px solid #ddd;
  margin-bottom: 15px;
}

.tab-button {
  flex-grow: 1;
  padding: 10px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 1rem;
}

.tab-button.active {
  border-bottom: 3px solid #0073e6;
  font-weight: bold;
}

/* Tab Content */
.tab-content {
  display: none;
}

#deal-info {
  display: block;
}

/* Formular Styles im Modal */
.modal-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1em;
}

.modal-form .form-group {
  display: flex;
  flex-direction: column;
}

.modal-form label {
  margin-bottom: 0.3em;
  font-weight: 500;
}

.modal-form input,
.modal-form select {
  padding: 0.5em;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 0.5em;
  margin-top: 1em;
}

.btn {
  padding: 0.6em 1.2em;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
}

.btn-primary {
  background: #0065ff;
  color: #fff;
}

.btn-secondary {
  background: #eee;
  color: #333;
}

/* Kontaktkarte */
.contact-card {
  background: #f9f9f9;
  padding: 1em;
  border-radius: 6px;
  margin-bottom: 1em;
}

.contact-card h3 {
  margin-top: 0;
  margin-bottom: 0.5em;
}

.contact-fields label {
  display: block;
  margin-bottom: 0.5em;
}

.contact-fields input[readonly] {
  width: 100%;
  padding: 0.5em;
  margin-top: 0.3em;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* Upload-Bereich */
.upload-section {
  padding: 0.5em 0;
}

.upload-section h3 {
  font-size: 1.2rem;
}

.upload-section input[type="file"] {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.upload-result {
  margin-top: 0.5em;
  font-size: 0.9rem;
  color: #333;
}

.progress-container {
  width: 100%;
  height: 10px;
  background: #e0e0e0;
  border-radius: 5px;
  margin-top: 5px;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: #0073e6;
  border-radius: 5px;
  transition: width 0.2s;
}

/* Responsive Modal */
@media (max-width: 600px) {
  .modal-container {
    width: 95%;
    padding: 15px;
  }
  .modal-form {
    grid-template-columns: 1fr;
  }
  .modal-tabs {
    flex-direction: column;
  }
  .tab-button {
    border-bottom: none;
    border-left: 3px solid transparent;
    text-align: left;
    padding: 8px;
  }
  .tab-button.active {
    border-left: 3px solid #0073e6;
  }
}