/*
 * Dzienniczek Praktyk Online - Minimal CSS
 * Uses Bootstrap 5.3.0 as the primary framework.
 * Custom CSS is limited to components that Bootstrap doesn't cover well.
 */

/* ================================================================
   STATUS COLORS - consistent across the app
   ================================================================ */

:root {
  --status-missing: #6f42c1;
  --status-missing-bg-subtle: #e2e3ff;
}

.text-status-missing      { color: var(--status-missing) !important; }
.border-status-missing    { border-color: var(--status-missing) !important; }
.bg-status-missing        { background-color: var(--status-missing) !important; color: #fff; }
.bg-status-missing-subtle { background-color: var(--status-missing-bg-subtle) !important; }

/* ================================================================
   LOGIN PAGE - Professional, centered authentication interface
   ================================================================ */

.login-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #1e3a5f 0%, #0f1f35 100%);
}

.login-card {
  background-color: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  padding: 3rem;
  width: 100%;
  max-width: 420px;
}

.login-card h1 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #1e3a5f;
  font-weight: 800;
  text-align: center;
}

.login-form-group {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
}

.login-form-group label {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #1a202c;
}

.login-form-group input {
  padding: 0.5rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  font-size: 1rem;
  transition: all 0.2s ease-in-out;
  background-color: #ffffff;
  color: #1a202c;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
}

.login-form-group input:focus {
  outline: none;
  border-color: #1e3a5f;
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

@media (max-width: 375px) {
  .login-card {
    padding: 1.5rem;
  }
}

@media (min-width: 768px) {
  .login-card {
    max-width: 450px;
  }
}

/* ================================================================
   CLICKABLE TABLE ROWS - Admin dashboard praktyka table
   ================================================================ */

table.table tbody tr.clickable-row {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

table.table tbody tr.clickable-row:hover {
  background-color: #e9ecef !important;
}

/* ================================================================
   AUTO-EXPANDING TEXTAREAS - entry/comment fields grow with content
   Modern browsers: CSS field-sizing. Older browsers: JS fallback
   (see autosizeTextarea() in page scripts) adjusts height on input.
   ================================================================ */

textarea.autosize {
  field-sizing: content;
  min-height: 6rem;
  max-height: 32rem;
  overflow-y: auto;
  resize: vertical;
}

/* ================================================================
   ENTRY THREADS & ITEMS - collapsed text with gradient fade
   Used in entry history / moderation views
   ================================================================ */

.entry-thread {
  border-left: 3px solid #dee2e6;
  margin-left: 0;
  margin-bottom: 12px;
  padding-left: 15px;
}

.entry-item {
  margin-bottom: 12px;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 4px;
  margin-left: 0;
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}

.entry-item:hover {
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.35);
}

.entry-item.entry-focused {
  box-shadow: 0 0 0 3px #0d6efd;
}

.entry-text {
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  margin: 8px 0;
  min-width: 0;
}

.entry-text.collapsed {
  max-height: 3rem;
  overflow: hidden;
  position: relative;
}

.entry-text.collapsed::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0.3rem;
  background: linear-gradient(transparent, rgba(248, 249, 250, 0.6));
  pointer-events: none;
}

.expand-toggle {
  font-size: 0.8rem;
  cursor: pointer;
  color: #0d6efd;
  text-decoration: underline;
}

.comment-section {
  margin-top: 8px;
  padding: 8px;
  background-color: rgba(0,0,0,0.05);
  border-radius: 3px;
  font-size: 0.85rem;
  font-style: italic;
}

.date-header {
  font-weight: bold;
  color: #495057;
  margin-top: 12px;
  margin-bottom: 8px;
  font-size: 0.95rem;
}
