/* 
 * Bauträger Software-Umfrage
 * Custom CSS with Bootstrap 5
 * Accessibility: Legasthenie-freundlich, hohe Kontraste (WCAG AA)
 */

/* ========== CSS Variables ========== */
:root {
  --primary-color: #0066CC;
  --secondary-color: #005A9C;
  --success-color: #28A745;
  --warning-color: #FFC107;
  --danger-color: #DC3545;
  --text-primary: #212529;
  --text-secondary: #495057;
  --bg-light: #F8F9FA;
  --bg-white: #FFFFFF;
  --border-color: #DEE2E6;
}

/* ========== Typography (Legasthenie-freundlich) ========== */
body {
  font-family: 'Open Sans', Verdana, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  background-color: var(--bg-light);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.4;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* ========== High Contrast Focus Styles (Accessibility) ========== */
a:focus, 
button:focus, 
input:focus, 
select:focus, 
textarea:focus {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
  box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

/* ========== Hero Images ========== */
.hero-image {
  height: 300px;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  margin-bottom: 2rem;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.hero-overlay {
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.85), rgba(0, 90, 156, 0.85));
  height: 100%;
  display: flex;
  align-items: center;
  padding: 2rem;
}

.hero-overlay h1 {
  margin: 0;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-overlay p {
  margin: 0.5rem 0 0 0;
  color: rgba(255, 255, 255, 0.9);
}

/* ========== Forms ========== */
.form-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.form-control, 
.form-select {
  border: 2px solid var(--border-color);
  border-radius: 6px;
  padding: 0.75rem;
  font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, 
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

.form-control.is-invalid {
  border-color: var(--danger-color);
}

/* ========== Buttons ========== */
.btn {
  border-radius: 6px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: white;
}

/* ========== Cards ========== */
.card {
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-header {
  background-color: var(--bg-light);
  border-bottom: 2px solid var(--border-color);
  padding: 1rem 1.25rem;
  font-weight: 600;
}

/* ========== Progress Bar ========== */
.progress {
  height: 8px;
  border-radius: 10px;
  background-color: #E9ECEF;
}

.progress-bar {
  background-color: var(--primary-color);
  transition: width 0.6s ease;
}

/* ========== Multi-Step Form ========== */
.form-step {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== Software System Cards ========== */
.software-system-card {
  border-left: 4px solid var(--primary-color);
}

.software-system-card .card-header {
  background-color: #F1F8FF;
}

/* ========== Rating Buttons ========== */
.btn-check:checked + .btn-outline-primary {
  background-color: var(--primary-color);
  color: white;
}

/* ========== Tooltips ========== */
.tooltip-inner {
  background-color: var(--text-primary);
  font-size: 14px;
  padding: 8px 12px;
  max-width: 300px;
  text-align: left;
}

.bi-info-circle {
  cursor: help;
  font-size: 1.1em;
  vertical-align: middle;
}

/* ========== Fixed Contact Button ========== */
.fixed-contact-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fixed-contact-btn:hover {
  background-color: var(--secondary-color);
  transform: scale(1.1);
}

/* ========== Navbar ========== */
.navbar {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-weight: 700;
  color: var(--primary-color) !important;
  font-size: 1.25rem;
}

/* ========== Toast Notifications ========== */
.toast {
  min-width: 300px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast-body {
  font-size: 14px;
}

/* ========== Tables ========== */
.table {
  background-color: white;
}

.table thead th {
  background-color: var(--primary-color);
  color: white;
  border: none;
  font-weight: 600;
}

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

/* ========== Badges ========== */
.badge {
  font-weight: 600;
  padding: 0.5em 0.8em;
  border-radius: 6px;
}

.badge.bg-success {
  background-color: var(--success-color) !important;
}

.badge.bg-warning {
  background-color: var(--warning-color) !important;
}

.badge.bg-secondary {
  background-color: #6C757D !important;
}

/* ========== Login Page ========== */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0066CC 0%, #005A9C 100%);
}

.login-card {
  max-width: 450px;
  width: 100%;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  padding: 2rem;
}

.login-card .logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-card .logo h2 {
  color: var(--primary-color);
  margin: 0;
}

/* ========== Mobile Responsiveness ========== */
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }
  
  .hero-image {
    height: 200px;
  }
  
  .hero-overlay h1 {
    font-size: 1.75rem;
  }
  
  .btn {
    padding: 0.6rem 1.2rem;
  }
  
  .fixed-contact-btn {
    width: 50px;
    height: 50px;
    bottom: 1rem;
    right: 1rem;
  }
  
  .card {
    margin-bottom: 1rem;
  }
}

/* ========== Software Selection Accordion ========== */
.accordion-button {
  font-weight: 600;
  font-size: 1.05rem;
  padding: 1rem 1.25rem;
  background-color: #f8f9fa;
}

.accordion-button:not(.collapsed) {
  background-color: var(--primary-color);
  color: white;
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
  border-color: var(--primary-color);
}

.accordion-body {
  padding: 1.5rem;
}

/* Software checkbox labels */
.predefined-software-checkbox {
  cursor: pointer;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.25rem;
}

.predefined-software-checkbox:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.form-check-label {
  cursor: pointer;
  padding-left: 0.5rem;
  user-select: none;
}

.form-check-label:hover {
  color: var(--primary-color);
}

/* Manual software cards */
.manual-software-card {
  border-left: 4px solid #6c757d;
  transition: box-shadow 0.2s;
}

.manual-software-card:hover {
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
}

.manual-software-card .card-header {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

/* Selection counter */
#selectedSoftwareCount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--success-color);
}

/* ========== Print Styles ========== */
@media print {
  .navbar,
  .fixed-contact-btn,
  .btn,
  .toast-container {
    display: none !important;
  }
  
  body {
    background: white;
  }
  
  .card {
    border: 1px solid #000;
    break-inside: avoid;
  }
}
