/* ✅ KONTO CSS - NUR SEITENSPEZIFISCHE STYLES */
/* (Generische .pp-section, .pp-header sind jetzt in pp_haupt.css) */

/* 🎯 KONTO-CONTAINER (Konto-spezifisch) */
.pp-konto-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

/* 🎯 KONTO-HEADER (Konto-spezifisch) */
.konto-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
}

.konto-header h2 {
  color: #2c3e50;
  margin-bottom: 10px;
}

.konto-header p {
  color: #7f8c8d;
  font-size: 16px;
}

/* 🎯 KONTO-SECTIONS (Konto-spezifisch) */
.pp-konto-section {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 25px;
  border: 1px solid #e9ecef;
}

.pp-konto-section h3 {
  color: #2c3e50;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e9ecef;
}

/* 🎯 ACCOUNT-OVERVIEW (Konto-spezifisch) */
.account-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.overview-card {
  display: flex;
  align-items: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 1px solid #e9ecef;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.overview-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.overview-icon {
  font-size: 32px;
  margin-right: 15px;
  width: 50px;
  text-align: center;
  color: #2c3e50;
}

.overview-content h4 {
  margin: 0 0 5px 0;
  color: #2c3e50;
  font-size: 16px;
  font-weight: 600;
}

.overview-content p {
  margin: 0;
  color: #6c757d;
  font-size: 14px;
}
/* 🎯 TABLE WRAPPER: horizontales Scrollen + Hinweis */
.payments-table {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  touch-action: pan-x; /* Mobile: horizontales Wischen erlauben */
  overscroll-behavior-x: contain;
}

.payments-table:focus {
  outline: 2px solid #4c9ffe;
  outline-offset: 2px;
}

.payments-table .scroll-hint {
  font-size: 12px;
  color: #6c757d;
  margin: 0 0 6px 4px;
}

/* Horizontal-Container ohne Buttons (Touch-Scroll) */
.horizontal-scroll {
  position: relative;
}

/* Falls übergeordnete Container restriktiv sind, trotzdem erlauben */
.pp-konto-section,
.pp-konto-container {
  overflow: visible;
}

/* 🔧 Hard Overrides: Erzwinge horizontales Scrollen trotz Theme/Plugins */
.payments-table {
  overflow-x: auto !important;
}
.payments-table table {
  width: max-content !important;
  min-width: 700px !important;
}
.horizontal-scroll,
.pp-konto-section,
.pp-konto-container {
  overflow: visible !important;
}

.payments-table table {
  width: max-content; /* Table wächst nach Inhalt → horizontaler Scroll im Wrapper */
  border-collapse: collapse;
  min-width: 700px; /* Grundbreite, kann größer werden */
}

.payments-table th,
.payments-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
  white-space: nowrap; /* verhindert Umbrüche bei kleinen Screens */
}

.payments-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #2c3e50;
}

.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.status-paid {
  background: #d4edda;
  color: #155724;
}
.status-pending {
  background: #fff3cd;
  color: #856404;
}
.status-failed {
  background: #f8d7da;
  color: #721c24;
}
.status-refunded {
  background: #e2e3e5;
  color: #383d41;
}

.action-btn {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  margin-right: 5px;
  transition: background 0.3s;
}

.action-btn:hover {
  background: #f8f9fa;
}

.transaction-info {
  position: relative;
}
.transaction-btn {
  background: #3498db;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8em;
}
.transaction-btn:hover {
  background: #2980b9;
}
.transaction-details {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 8px;
  margin-top: 5px;
  z-index: 1000;
  min-width: 200px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.transaction-details small {
  color: #666;
  font-family: monospace;
}

/* 🎯 MOBILE SWITCH: <640px optional Listenlayout via data-attr */
@media (max-width: 640px) {
  .payments-table[data-layout="list"] table {
    min-width: unset;
  }
  .payments-table[data-layout="list"] thead {
    display: none;
  }
  .payments-table[data-layout="list"] tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
  }
  .payments-table[data-layout="list"] td {
    white-space: normal;
    padding: 6px 8px;
  }
  .payments-table[data-layout="list"] td[data-label]::before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: #2c3e50;
  }
}

/* 🎯 TRANSACTION-HISTORY (Konto-spezifisch) */
.transaction-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.transaction-info {
  flex: 1;
}

.transaction-info h5 {
  margin: 0 0 5px 0;
  color: #2c3e50;
  font-size: 16px;
}

.transaction-info p {
  margin: 0;
  color: #6c757d;
  font-size: 14px;
}

.transaction-amount {
  font-size: 18px;
  font-weight: bold;
  color: #28a745;
}

.transaction-date {
  color: #6c757d;
  font-size: 12px;
  margin-left: 15px;
}

/* 🎯 PAYMENT-STATUS (Konto-spezifisch) */
.payment-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-indicator.paid {
  background: #28a745;
}

.status-indicator.pending {
  background: #ffc107;
}

.status-indicator.failed {
  background: #dc3545;
}

.status-text {
  font-weight: 500;
}

.status-text.paid {
  color: #28a745;
}

.status-text.pending {
  color: #856404;
}

.status-text.failed {
  color: #dc3545;
}

/* 🎯 PROFILE-SUMMARY (Konto-spezifisch) */
.profile-summary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 25px;
  text-align: center;
}

.profile-summary h3 {
  margin: 0 0 10px 0;
  font-size: 24px;
}

.profile-summary p {
  margin: 0;
  opacity: 0.9;
  font-size: 16px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 14px;
  opacity: 0.8;
}

/* 🎯 QUICK-ACTIONS (Konto-spezifisch) */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  background: #fff;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  text-decoration: none;
  color: #2c3e50;
  transition: all 0.3s ease;
  font-weight: 500;
}

.quick-action-btn:hover {
  border-color: #007bff;
  background: #f8f9ff;
  transform: translateY(-2px);
  text-decoration: none;
  color: #007bff;
}

.quick-action-icon {
  font-size: 20px;
  margin-right: 10px;
  width: 24px;
}

/* 🎯 SUBSCRIPTION-INFO (Konto-spezifisch) */
.subscription-card {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 25px;
}

.subscription-card h4 {
  margin: 0 0 15px 0;
  font-size: 20px;
}

.subscription-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 15px;
}

.subscription-detail {
  display: flex;
  flex-direction: column;
}

.detail-label {
  font-size: 12px;
  opacity: 0.8;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.detail-value {
  font-size: 16px;
  font-weight: 600;
}

/* 🎯 MOBILE RESPONSIVE (Konto-spezifisch) */
@media (max-width: 768px) {
  .pp-konto-container {
    padding: 15px;
  }

  .account-overview {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .overview-card {
    padding: 15px;
  }

  .overview-icon {
    font-size: 24px;
    margin-right: 10px;
    width: 40px;
  }

  .transaction-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .transaction-amount {
    align-self: flex-end;
  }

  .profile-stats {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .subscription-details {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .quick-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .quick-action-btn {
    padding: 12px 15px;
  }
}

/* Mobile: Kachelzeile horizontal scrollen (z. B. 5. Kachel sichtbar) */
@media (max-width: 640px) {
  .account-overview,
  .quick-actions {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }
  .overview-card,
  .quick-action-btn {
    min-width: 240px;
    scroll-snap-align: start;
  }
}

/* 🎯 TABLE WRAPPER: horizontales Scrollen + Hinweis */
.payments-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 8px;
}

.payments-table:focus {
  outline: 2px solid #4c9ffe;
  outline-offset: 2px;
}

.payments-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px; /* verhindert Spaltenquetschen auf 375px */
}

.payments-table th,
.payments-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
  white-space: nowrap; /* verhindert Umbrüche bei kleinen Screens */
}

.payments-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #2c3e50;
}

.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.status-paid {
  background: #d4edda;
  color: #155724;
}
.status-pending {
  background: #fff3cd;
  color: #856404;
}
.status-failed {
  background: #f8d7da;
  color: #721c24;
}
.status-refunded {
  background: #e2e3e5;
  color: #383d41;
}

.action-btn {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  margin-right: 5px;
  transition: background 0.3s;
}

.action-btn:hover {
  background: #f8f9fa;
}

.transaction-info {
  position: relative;
}
.transaction-btn {
  background: #3498db;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8em;
}
.transaction-btn:hover {
  background: #2980b9;
}
.transaction-details {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 8px;
  margin-top: 5px;
  z-index: 1000;
  min-width: 200px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.transaction-details small {
  color: #666;
  font-family: monospace;
}

/* 🎯 MOBILE SWITCH: <640px Listenlayout automatisch */
@media (max-width: 640px) {
  .payments-table table {
    min-width: unset;
  }
  .payments-table thead {
    display: none;
  }
  .payments-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
  }
  .payments-table td {
    white-space: normal;
    padding: 6px 8px;
  }
  .payments-table td[data-label]::before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: #2c3e50;
  }
}
