/**
 * @file
 * user-upload.css
 * 
 * Version: 2025.10.27.162000
 * Autor: Willi da Silva Borges - WDSB-Webdesign
 */

/* Container */
.user-upload-container {
  max-width: 800px;
  margin: 50px auto;
  padding: 20px;
}

.user-upload-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 40px;
}

.user-upload-header {
  text-align: center;
  margin-bottom: 30px;
}

.user-upload-header h1 {
  font-size: 32px;
  margin: 0 0 20px 0;
  color: #333;
}

.user-upload-header p {
  color: #666;
  font-size: 16px;
  margin: 0;
}

/* Info-Text für Registrierungs-Hinweis */
.user-upload-info {
  background: #e7f3ff;
  border: 1px solid #b3d9ff;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0 30px 0;
  text-align: left;
}

.user-upload-info p {
  color: #004085;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

.user-upload-info a {
  color: #0056b3;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.user-upload-info a:hover {
  color: #003d82;
  text-decoration: underline;
}

.email-form-label {
  color: #333;
  font-size: 18px;
  font-weight: 600;
  margin: 20px 0 0 0;
}

/* Formular */
.user-upload-form {
  max-width: 400px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: #007bff;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background: #007bff;
  color: white;
  width: 100%;
}

.btn-primary:hover {
  background: #0056b3;
}

/* Upload Zone */
.upload-zone {
  border: 3px dashed #ddd;
  border-radius: 12px;
  padding: 60px 40px;
  text-align: center;
  background: #f8f9fa;
  transition: all 0.3s;
  cursor: pointer;
  margin-bottom: 30px;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: #007bff;
  background: #e7f3ff;
}

.upload-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.upload-info {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.upload-info h4 {
  margin: 0 0 10px 0;
  color: #333;
}

.upload-info ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.upload-info ul li {
  margin-bottom: 5px;
  color: #666;
}

/* File Queue */
.file-queue {
  margin-top: 30px;
}

.file-item {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
}

.file-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.file-name {
  font-weight: 600;
  color: #333;
  flex: 1;
}

.file-size {
  color: #666;
  font-size: 14px;
}

.file-progress {
  height: 4px;
  background: #e9ecef;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar {
  height: 100%;
  background: #007bff;
  width: 0;
  transition: width 0.3s;
}

.file-status {
  font-size: 14px;
  color: #666;
}

.file-status.uploading {
  color: #007bff;
}

.file-status.success {
  color: #28a745;
}

.file-status.error {
  color: #dc3545;
}

/* Messages */
.upload-message {
  margin-top: 20px;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
}

.upload-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.upload-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Backend */
.user-upload-backend {
  padding: 20px;
}

.backend-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.backend-header h1 {
  margin: 0;
  color: #333;
}

.backend-actions {
  display: flex;
  gap: 10px;
}

.btn-info {
  background: #17a2b8;
  color: white;
}

.btn-info:hover {
  background: #138496;
  text-decoration: none;
}

.backend-content {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.user-table {
  width: 100%;
  border-collapse: collapse;
}

.user-table th {
  background: #f8f9fa;
  padding: 15px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
}

.user-table td {
  padding: 15px;
  border-bottom: 1px solid #dee2e6;
}

.user-table code {
  background: #f1f3f5;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 14px;
  margin-right: 5px;
}

.btn-edit {
  background: #ffc107;
  color: #000;
}

.btn-edit:hover {
  background: #e0a800;
}

.btn-delete {
  background: #dc3545;
  color: white;
}

.btn-delete:hover {
  background: #c82333;
}

.btn-confirmation {
  background: #28a745;
  color: white;
}

.btn-confirmation:hover {
  background: #218838;
}

.btn-confirmation:disabled {
  background: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Badges für Versandstatus */
.badge {
  display: inline-block;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  text-align: center;
}

.badge-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.badge-secondary {
  background: #e2e3e5;
  color: #383d41;
  border: 1px solid #d6d8db;
}

.shipping-date-cell {
  text-align: center;
}

.empty-message {
  text-align: center;
  color: #666;
  font-style: italic;
}

/* ============================================================================
   E-Mail-Template Editor
   ============================================================================ */

.user-upload-email-template-editor {
  padding: 20px;
  margin: 0 auto;
}

.header-actions {
  display: flex;
  gap: 10px;
}

.btn-success {
  background: #28a745;
  color: white;
}

.btn-success:hover {
  background: #218838;
}

/* Templates-Übersicht */
.templates-overview {
  background: white;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  margin-bottom: 30px;
}

.templates-overview h2 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 22px;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 10px;
}

.templates-table {
  width: 100%;
  border-collapse: collapse;
}

.templates-table th {
  background: #495057;
  color: white;
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  border-bottom: 2px solid #343a40;
}

.templates-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #dee2e6;
  vertical-align: middle;
}

.templates-table tr:hover {
  background: #f8f9fa;
}

.templates-table code {
  background: #e7f3ff;
  color: #004085;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 13px;
}

/* Template-Editor Modal */
.template-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.template-modal.hidden {
  display: none;
}

.modal-large {
  max-width: 1000px !important;
  width: 95% !important;
}

.template-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.template-editor-header h1 {
  margin: 0;
  color: #333;
}

.template-editor-content {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.template-info {
  background: #e7f3ff;
  border: 1px solid #b3d9ff;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 30px;
}

.template-info p {
  margin: 5px 0;
  color: #004085;
}

.template-info code {
  background: #d4edda;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: #155724;
}

.template-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.template-form .form-group {
  margin-bottom: 25px;
}

.template-form .form-row .form-group {
  margin-bottom: 0;
}

.template-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 16px;
}

.template-form .form-control,
.template-form select.form-control {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
  font-family: inherit;
}

.template-form .form-control:focus,
.template-form select.form-control:focus {
  outline: none;
  border-color: #007bff;
}

.template-form .form-control:disabled,
.template-form select.form-control:disabled {
  background: #e9ecef;
  cursor: not-allowed;
  opacity: 0.7;
}

.template-form .template-body {
  font-family: 'Courier New', monospace;
  resize: vertical;
  min-height: 400px;
}

.template-form .form-text {
  display: block;
  margin-top: 5px;
  color: #666;
  font-size: 14px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 30px;
}

/* E-Mail-Vorschau Modal */
.email-preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.email-preview-modal.hidden {
  display: none;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 12px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #dee2e6;
}

.modal-header h3 {
  margin: 0;
  color: #333;
}

.modal-close {
  background: #dc3545;
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s;
}

.modal-close:hover {
  background: #c82333;
  transform: scale(1.1);
}

.modal-body {
  padding: 20px;
}

.preview-subject,
.preview-body {
  margin-bottom: 20px;
}

.preview-subject strong,
.preview-body strong {
  display: block;
  margin-bottom: 10px;
  color: #333;
  font-size: 16px;
}

.preview-subject p {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #dee2e6;
  margin: 0;
  font-weight: 600;
}

.preview-body pre {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 6px;
  border: 1px solid #dee2e6;
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.6;
}
.user-upload-info p {
	color: #000 !important;
}
.user-upload-header h1 {
	color: #000 !important;
}
