/* E-tjänster Public Forms Styles */

.breadcrumb-bar {
  background: #f5f5f5;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e0e0e0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li:not(:last-child)::after {
  content: '/';
  margin: 0 0.5rem;
  color: #999;
}

.breadcrumb a {
  color: #005f85;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb li[aria-current="page"] {
  color: #666;
}

.e-tjanst-main {
  padding: 2rem 0 4rem;
  background: #f9fafb;
  min-height: calc(100vh - 300px);
}

/* Form Card */
.form-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  max-width: 800px;
  margin: 0 auto;
}

.form-card-header {
  background: linear-gradient(135deg, #005f85 0%, #003d57 100%);
  color: white;
  padding: 2rem;
}

.form-card-header h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.form-card-header p {
  margin: 0;
  opacity: 0.9;
}

.form-card-body {
  padding: 2rem;
}

/* Info Box */
.info-box {
  display: flex;
  gap: 1rem;
  background: #e8f4fd;
  border: 1px solid #b8daef;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 2rem;
}

.info-box svg {
  flex-shrink: 0;
  color: #005f85;
}

.info-box p {
  margin: 0;
  color: #004d6b;
  font-size: 0.9rem;
}

/* Form Sections */
.form-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 1rem;
}

.form-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #005f85;
  margin: 0 0 1.25rem;
}

/* Form Elements */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: #005f85;
  box-shadow: 0 0 0 3px rgba(0, 95, 133, 0.1);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-hint {
  display: block;
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.95rem;
}

.checkbox-label input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: #005f85;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
  margin-top: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, #005f85 0%, #003d57 100%);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #004d6b 0%, #002d42 100%);
}

.btn-outline {
  background: transparent;
  border: 2px solid #005f85;
  color: #005f85;
}

.btn-outline:hover {
  background: #005f85;
  color: white;
}

/* Contract Card */
.contract-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  max-width: 700px;
  margin: 0 auto;
}

.contract-header {
  background: linear-gradient(135deg, #005f85 0%, #003d57 100%);
  color: white;
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contract-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contract-icon svg {
  width: 24px;
  height: 24px;
}

.contract-header h2 {
  margin: 0;
  font-size: 1.4rem;
}

.contract-body {
  padding: 2rem;
}

.contract-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.contract-detail-row:last-child {
  border-bottom: none;
}

.contract-detail-label {
  color: #6b7280;
}

.contract-detail-value {
  font-weight: 500;
  color: #111827;
  text-align: right;
}

.contract-terms {
  background: #f9fafb;
  padding: 1.5rem 2rem;
  border-top: 1px solid #e5e7eb;
}

.contract-terms h4 {
  margin: 0 0 0.75rem;
  color: #111827;
}

.contract-terms p {
  color: #6b7280;
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
}

.contract-terms ul {
  margin: 0;
  padding-left: 1.25rem;
  color: #6b7280;
  font-size: 0.9rem;
}

.contract-terms li {
  margin: 0.5rem 0;
}

.contract-signature-info {
  padding: 1.5rem 2rem;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}

.signature-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.signature-badge svg {
  width: 16px;
  height: 16px;
}

.signature-note {
  color: #6b7280;
  font-size: 0.85rem;
  margin: 0;
}

.contract-actions {
  padding: 1.5rem 2rem;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

/* Success Card */
.success-card {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: white;
}

.success-card h2 {
  color: #005f85;
  margin-bottom: 0.5rem;
}

.success-message {
  color: #6b7280;
  margin-bottom: 2rem;
}

.success-details {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.success-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.success-detail-row:last-child {
  border-bottom: none;
}

.success-detail-label {
  color: #6b7280;
}

.success-detail-value {
  font-weight: 600;
  color: #111827;
}

.success-info {
  text-align: left;
  margin-bottom: 2rem;
}

.success-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.loading-overlay.hidden {
  display: none;
}

.loading-content {
  background: white;
  padding: 2.5rem;
  border-radius: 16px;
  text-align: center;
  max-width: 350px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e5e7eb;
  border-top: 4px solid #005f85;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1.5rem;
}

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

.loading-content h3 {
  color: #111827;
  margin: 0 0 0.5rem;
}

.loading-content p {
  color: #6b7280;
  margin: 0;
}

.loading-placeholder {
  text-align: center;
  padding: 2rem;
  color: #6b7280;
}
