/* ==============================================
   EINHEITLICHES DESIGN FÜR ALLE SEITEN
   ============================================== */

/* Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body - Einheitlicher Hintergrund für alle Seiten */
body {
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
}

/* Container-Styles - Einheitlich für alle Seiten */
.page-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.content-container {
  background: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 800px;
}

/* Für kleinere Container (Login, Index) */
.content-container.small {
  max-width: 500px;
  text-align: center;
}

/* Header-Styles */
h1 {
  color: #333;
  margin-bottom: 20px;
  font-size: 28px;
  text-align: center;
}

h2 {
  color: #333;
  margin-bottom: 15px;
  font-size: 22px;
}

h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 16px;
}

/* Paragraph-Styles */
p {
  color: #666;
  margin-bottom: 20px;
  font-size: 16px;
  line-height: 1.6;
}

/* Form-Styles - Einheitlich */
form {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #555;
}

input[type="text"], 
input[type="password"], 
select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  margin-bottom: 15px;
  transition: border-color 0.2s;
}

input[type="text"]:focus, 
input[type="password"]:focus, 
select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

input[type="checkbox"] {
  margin-right: 8px;
}

/* Button-Styles - Einheitlich */
.button {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: transform 0.2s, box-shadow 0.2s;
  margin: 5px;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.button:active {
  transform: translateY(0);
}

.button.secondary {
  background: #6c757d;
}

.button.small {
  padding: 8px 16px;
  font-size: 14px;
}

/* Flash Messages - Einheitlich */
.flash {
  padding: 12px;
  margin: 15px 0;
  border-radius: 5px;
  font-size: 14px;
  font-weight: bold;
}

.flash.error {
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.flash.success {
  background-color: #efe;
  color: #3c3;
  border: 1px solid #cfc;
}

.flash.info {
  background-color: #eef;
  color: #33c;
  border: 1px solid #ccf;
}

/* Table-Styles */
.table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 20px;
  background: white;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table th, .table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
  font-size: 13px;
}

.table th {
  background-color: #f8f9fa;
  font-weight: bold;
  color: #333;
}

.table tr:nth-child(even) {
  background-color: #f8f9fa;
}

.table tr:hover {
  background-color: #e9ecef;
}

/* Responsive table wrapper */
#dienstplan-table-container {
  overflow-x: auto;
  max-width: 100%;
  margin-top: 30px;
}

#loadDienstplanLoadingBar {
  margin-top: 30px;
}

/* Layout Helper */
.button-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 15px 0;
}

.button-row form {
  margin: 0;
}

/* Loading Bar */
.loading-bar {
  width: 100%;
  height: 4px;
  background-color: #e9ecef;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 15px;
}

.loading-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  width: 100%;
  animation: loading-animation 1.5s ease-in-out infinite;
}

@keyframes loading-animation {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(100%);
  }
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* iCal Panel */
.ical-panel {
  margin-top: 30px;
  padding: 20px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #f8f9ff;
}

.ical-panel code {
  background: #fff;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  display: inline-block;
  font-family: monospace;
  color: #333;
}

.hint {
  color: #666;
  font-size: 12px;
  font-style: italic;
}

/* Navigation */
.nav-links {
  text-align: center;
  margin-bottom: 20px;
}

.nav-links a {
  color: #667eea;
  text-decoration: none;
  margin: 0 15px;
  font-weight: bold;
}

.nav-links a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .content-container {
    padding: 20px;
    margin: 10px;
  }
  
  .button-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .button {
    margin: 5px 0;
  }
  
  /* Radio Buttons untereinander auf mobil */
  #time-format-group {
    flex-direction: column !important;
    gap: 10px !important;
  }
  
  /* Link-Feld schmaler */
  .ical-panel code {
    max-width: 100%;
    word-break: break-all;
    padding-right: 35px;
  }
}

/* Sehr kleine Bildschirme */
@media (max-width: 480px) {
  .button-row > div {
    flex-direction: column !important;
  }
  
  .button-row > div > * {
    flex: 1 1 auto !important;
    min-width: 100% !important;
    width: 100%;
  }
}
