/* shared-styles.css */

.modal-scrollableConfirm {
  background: white;
  padding: 2rem;
  max-width: 400px;
  margin: 10% auto;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* Tabellen-Sortierung */
.sort-arrow {
  margin-left: 4px;
  font-size: 0.8em;
  color: gray;
}

  .btn-label {
      display: none;
      margin-left: 6px;
      font-size: 0.9rem;
      font-weight: bold;
  }

  /* Nur auf großen Screens (> 650px) das Label zeigen */
  @media (min-width: 650px) {
    .btn.labeled .btn-label {
       display: inline;
     }
  }
  
  /* Auf großen Bildschirmen Label anzeigen */
@media (min-width: 651px) {
  .btn.labeled .btn-label {
    display: inline;
  }
}
  
  .btn-label {
  display: none;
  margin-left: 6px;
  font-weight: bold;
  font-size: 0.85rem;
}

.legal-link,
.legal-link:visited,
.legal-link:hover,
.legal-link:active {
  text-decoration: none;
  color: #007BFF;
}

.legal-link:hover {
  color: #555;
}

input:focus, textarea:focus, select:focus {outline: 2px solid #007BFF;}

  .table-wrapper { width: 100%; overflow-x: auto; }
  .tab-container { margin: 20px; }
  .tab-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
  .tab-buttons button { padding: 10px 20px; border: none; background-color: #eee; cursor: pointer; border-radius: 8px; font-weight: bold; width: 150px; }
  .tab-buttons button.active { background-color: #4a90e2; color: white; }
  .tab-content { display: none; animation: fadeIn 0.5s; }
  .tab-content.active { display: block; }
  @keyframes fadeIn { from {opacity: 0;} to {opacity: 1;} }

/* Error Handling */
.messagebarcontent {
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 500;
  box-shadow: 0 0 5px rgba(0,0,0,0.05);
}

.messagebarcontent.progress {
  background-color: #e0f0ff;
  color: #004080;
}

.messagebarcontent.success {
  background-color: #e8f8ec;
  color: #267a3b;
}

.messagebarcontent.warning {
  background-color: #fff4e5;
  color: #a46900;
}

.messagebarcontent.error {
  background-color: #fdeaea;
  color: #a30000;
}

/* Base Styles */
* {
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  margin: 0;
  padding: 0;
  background: #f8f9fa;
  color: #212529;
  font-size: 0.95rem;
  line-height: 1.5;
}

h1, h2 {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

h1 {
  font-size: 1.6rem;
}

h2 {
  font-size: 1.2rem;
}

/* Section Card */
.section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin: 1rem;
  padding: 1.5rem;
}

/* Form Controls */
label {
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.25rem;
}

input, select, textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

textarea {
  resize: vertical;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.form-group {
  flex: 1 1 3px;
}

/* Detail Labels & Values (used in showEntry) */
.detail-group {
  margin-bottom: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
}

.detail-label {
  font-weight: 600;
  min-width: 150px;
  display: inline-block;
  color: #444;
}

.detail-value {
  flex: 1;
  font-weight: 400;
  color: #333;
}

/* Buttons */
/* Global button base style */
.btn {
  padding: 10px 20px;
  border: none;
  background-color: #eee;
  cursor: pointer;
  border-radius: 8px;
  font-weight: bold;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Text buttons: wider */
.btn-text {
  min-width: 150px;
}

/* Text buttons: wider */
.btn-text-small {
  min-width: 110px;
}

/* Icon-only buttons: small square */
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 18px; /* optional: adjust emoji size */
}

.btn:hover {
  background: #357ABD;
}

.btn.secondary {
  background: #999;
}

.btn.icon {
  background: #e0e0e0;
  border: none;
  border-radius: 12px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  font-size: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.btn.icon:hover {
  background: #d0d0d0;
}

/* Button Row */
.button-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* Overlay Spinner */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.8);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  display: none;
}

.euro-spinner {
  font-size: 48px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Tables */
table {
  font-size: 0.85rem;
  width: 100%;
  border-collapse: collapse;
}

table th,
table td {
  padding: 4px 6px;
  border: 1px solid #ccc;
  font-weight: normal;
  white-space: nowrap;
}

th.align-center,
td.align-center {
  text-align: center;
}

th.align-right,
td.align-right {
  text-align: right;
}

th.align-left,
td.align-left {
  text-align: left;
}

table tbody tr:hover {
  background-color: #f3f3f3;
}

/* Image Styling */
.responsive-image {
  max-width: 100%;
  height: auto;
  margin-top: 1rem;
  border-radius: 8px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.1);
}

/* Mobile Optimization */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .form-group {
    width: 100%;
  }

  input, select, textarea {
    margin-bottom: 0;
  }

  .desktop-only {
    display: none;
  }

  .detail-label {
    min-width: 100px;
  }
}

/* Message Bar */
.message-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background-color: #fff;
  flex-wrap: wrap;
}


/* Logo */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  border-bottom: 1px solid #ddd;
  background-color: #fff;
  flex-wrap: wrap;
}

.logo-wrapper {
  display: flex;
  align-items: center;
}

.xpenseai-logo {
  height: 40px;
  opacity: 0.9;
  transition: opacity 0.3s ease;
  position: relative;
  top: 0px;
  left: 20px;
}

.xpenseai-logo:hover {
  opacity: 1;
}

/* Fix: checkboxes sollen nicht 100% Breite haben */
input[type="checkbox"] {
  width: auto !important;
}

/* Finalize */
   th.left, td.left {
     text-align: left;
   }

   th.right, td.right {
     text-align: right;
   }

/* Breiten für jede Spalte */
   th.id, td.id {
     width: 7%;
     font-size: 0.8em;
   }
   
   th.date, td.date {
     width: 10%;
     font-size: 0.8em;
   }
   
   th.description, td.description {
     width: 45%;
     font-size: 0.8em;
   }
   
   th.category, td.category {
     width: 15%;
     font-size: 0.8em;
   }
   
   th.amount, td.amount {
     width: 10%;
     font-size: 0.8em;
   }
   
   th.currency, td.currency {
     width: 5%;
     font-size: 0.8em;
}

