/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  color: #333;
  background-color: #f9fafb;
}

/* Layout */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navigation */
.main-nav {
  background-color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo span {
  font-size: 1.25rem;
  font-weight: bold;
  color: #111827;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  color: #374151;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
}

.nav-link:hover {
  color: #1f2937;
  border-bottom-color: #4f46e5;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem 0;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  margin-bottom: 2rem;
}

.header-content h1 {
  font-size: 1.875rem;
  font-weight: bold;
  color: #111827;
}

.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Environments Table */
.environments-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
}

.environments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.environments-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
}

.notice-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  margin-bottom: 1rem;
}

.notice {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  margin-bottom: 0.5rem;
}

.notice:last-child {
  margin-bottom: 0;
}

.notice.notice {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.notice.alert {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.notice.error {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.notice.success {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.button {
  background-color: #4f46e5;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.2s;
  border: none;
  cursor: pointer;
}

.button:hover {
  background-color: #4338ca;
}

.button-secondary {
  background-color: #f3f4f6;
  color: #374151;
}

.button-secondary:hover {
  background-color: #e5e7eb;
}

.button-danger {
  background-color: #dc2626;
}

.button-danger:hover {
  background-color: #b91c1c;
}

.table-container {
  overflow-x: auto;
}

.environments-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.environments-table th,
.environments-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.environments-table th {
  background-color: #f9fafb;
  font-weight: 600;
  color: #374151;
}

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

.actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.action-link {
  color: #4f46e5;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

.action-link:hover {
  color: #4338ca;
  text-decoration: underline;
}

.action-button {
  background: none;
  border: none;
  color: #dc2626;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}

.action-button:hover {
  color: #b91c1c;
  text-decoration: underline;
}

/* Environment Show Page */
.environment-details {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

.environment-header {
  margin-bottom: 2rem;
}

.environment-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.environment-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.detail-group {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
}

.detail-label {
  background-color: #f9fafb;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
}

.detail-value {
  padding: 1rem;
  font-size: 0.875rem;
  color: #1f2937;
  background-color: white;
}

.detail-value.certificate,
.detail-value.key {
  background-color: #f8fafc;
}

.detail-value pre {
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.75rem;
  line-height: 1.5;
}

/* Form Styles */
.error-message {
  background-color: #fef2f2;
  border: 1px solid #fee2e2;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.error-message h3 {
  color: #991b1b;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.error-message ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  color: #b91c1c;
  font-size: 0.875rem;
}

.form-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.875rem;
  color: #1f2937;
  background-color: white;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.certificate-input,
.key-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.75rem;
  line-height: 1.5;
  min-height: 100px;
  resize: vertical;
}

/* Responsive Design */
@media (max-width: 640px) {
  .nav-left {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
  }

  .environments-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .environment-actions {
    flex-direction: column;
    width: 100%;
  }

  .environment-actions .button {
    width: 100%;
    text-align: center;
  }
}

/* HL7 Message Form */
.hl7-form {
  margin-top: 2rem;
}

.hl7-input {
  width: 100%;
  font-family: monospace;
  font-size: 14px;
  line-height: 1.5;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #f8f9fa;
  resize: vertical;
}

.hl7-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* Utility Classes */
.mt-6 {
  margin-top: 1.5rem;
}
