/* createpatient_container.css - ОНОВЛЕНА ВЕРСІЯ З КАРТКАМИ */
:root {
  --primary-color: #4CAF50;
  --primary-hover: #3e8e41;
  --secondary-color: #3498db;
  --secondary-hover: #2980b9;
  --danger-color: #e74c3c;
  --danger-hover: #c0392b;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --border-color: #e0e0e0;
  --text-color: #333;
  --text-light: #6c757d;
  --shadow: 0 4px 20px rgba(0, 128, 0, 0.15);
  --transition: all 0.3s ease;
  --success-bg: #d4edda;
  --success-border: #28a745;
  --success-text: #155724;
  --error-bg: #f8d7da;
  --error-border: #dc3545;
  --error-text: #721c24;
  --warning-bg: #fff3cd;
  --warning-border: #ffc107;
  --warning-text: #856404;
  --input-height: 55px;
  --card-bg: #ffffff;
  --card-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  --card-border: 1px solid #eaecef;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.createpatient-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #ffffff 0%, #f0f9f0 100%);
  display: flex;
  flex-direction: column;
  font-family: 'KOLIBRI', sans-serif;
  z-index: 1000;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.createpatient-header {
  text-align: center;
  padding: 20px;
  color: #2e7d32;
  font-size: 24px;
  font-weight: 600;
  background: rgba(0, 128, 0, 0.05);
  border-bottom: 1px solid rgba(0, 128, 0, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.createpatient-content {
  flex: 1;
  overflow-y: auto;
  padding: 25px 20px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Стилі для карток форми */
.form-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.form-card {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--card-shadow);
  border: var(--card-border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.form-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-card-header {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #2c3e50;
  padding-bottom: 10px;
  border-bottom: 1px solid #eaecef;
}

/* Контейнер для конвертера одиниць */
.units-converter {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.units-converter input {
  flex: 1;
}

.units-converter span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  font-weight: 500;
  color: #7f8c8d;
}

/* Індикатор конвертації */
.conversion-hint {
  font-size: 12px;
  color: #7f8c8d;
  margin-top: 5px;
  font-style: italic;
}

.createpatient-footer {
  padding: 20px;
  background: rgba(0, 128, 0, 0.05);
  border-top: 1px solid rgba(0, 128, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.createpatient-footer .button-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  width: 100%;
  max-width: 500px;
  flex-wrap: wrap;
}

.createpatient-footer .button-group button {
  padding: 16px 24px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  font-size: 16px;
  text-align: center;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  flex: 0 0 auto;
}

.createpatient-footer .button-group button.card.green {
  background-color: var(--primary-color);
  color: white;
}

.createpatient-footer .button-group button.card.yellow {
  background-color: var(--warning-border);
  color: white;
}

.createpatient-footer .button-group button.card.red {
  background-color: var(--danger-color);
  color: white;
}

.createpatient-footer .button-group button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Адаптація для мобільних пристроїв */
@media (max-width: 768px) {
  .createpatient-header {
    padding: 15px;
    font-size: 20px;
  }
  
  .createpatient-content {
    padding: 20px 15px;
  }
  
  .form-cards-container {
    grid-template-columns: 1fr;
  }
  
  .createpatient-footer {
    padding: 15px;
  }
  
  .createpatient-footer .button-group {
    flex-direction: column;
    gap: 12px;
  }
  
  .createpatient-footer .button-group button {
    padding: 14px 20px;
    font-size: 14px;
    height: 50px;
    width: 100%;
    max-width: 250px;
  }
  
  :root {
    --input-height: 50px;
  }
  
  input[type="text"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  input[type="file"],
  select {
    padding: 12px;
    font-size: 14px;
    height: var(--input-height);
  }
}

/* Виправлення для горизонтального перегляду на малих екранах */
@media (max-width: 768px) and (orientation: landscape),
       (max-height: 500px) {
  .createpatient-container {
    flex-direction: column;
  }
  
  .createpatient-header {
    padding: 12px;
    font-size: 18px;
    flex-shrink: 0;
  }
  
  .createpatient-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    max-height: none;
  }
  
  .createpatient-footer {
    padding: 12px;
    flex-shrink: 0;
  }
  
  .createpatient-footer .button-group {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 5px;
    justify-content: center;
  }
  
  .createpatient-footer .button-group::-webkit-scrollbar {
    height: 4px;
  }
  
  .createpatient-footer .button-group::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
  }
  
  .createpatient-footer .button-group button {
    min-width: 120px;
    height: 45px;
    padding: 12px 16px;
    font-size: 13px;
    flex-shrink: 0;
  }
  
  :root {
    --input-height: 45px;
  }
  
  input[type="text"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  input[type="file"],
  select {
    padding: 10px 12px;
    font-size: 13px;
    height: var(--input-height);
  }
  
  .form-group {
    margin-bottom: 12px;
  }
  
  .createpatient-content {
    padding: 12px 15px;
  }
}

/* Для дуже малих екранів у горизонтальному режимі */
@media (max-width: 600px) and (orientation: landscape),
       (max-height: 400px) {
  .createpatient-header {
    padding: 8px;
    font-size: 16px;
  }
  
  .createpatient-content {
    padding: 10px 12px;
  }
  
  .createpatient-footer {
    padding: 8px;
  }
  
  .createpatient-footer .button-group {
    gap: 8px;
  }
  
  .createpatient-footer .button-group button {
    min-width: 100px;
    height: 40px;
    padding: 10px 12px;
    font-size: 12px;
  }
  
  :root {
    --input-height: 40px;
  }
  
  input[type="text"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  input[type="file"],
  select {
    padding: 8px 10px;
    font-size: 12px;
    height: var(--input-height);
  }
  
  .form-group {
    margin-bottom: 8px;
  }
  
  .form-group label {
    font-size: 12px;
    margin-bottom: 5px;
  }
}

/* Планшети та більші екрани */
@media (min-width: 1024px) {
  .createpatient-content {
    padding: 30px 25px;
  }
  
  .createpatient-header {
    padding: 25px;
    font-size: 28px;
  }
  
  .createpatient-footer .button-group {
    gap: 20px;
  }
  
  .createpatient-footer .button-group button {
    min-width: 180px;
  }
}

/* Інші стилі */
.form-group {
  margin-bottom: 18px;
  text-align: left;
  width: 100%;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-color);
  font-size: 14px;
}

.form-field-container {
  position: relative;
  width: 100%;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="file"],
select {
  width: 100%;
  height: var(--input-height);
  padding: 15px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: 16px;
  transition: var(--transition);
  background-color: white;
  font-family: 'KOLIBRI', sans-serif;
  box-sizing: border-box;
}

input:focus,
select:focus {
  outline: none;
  border-color: #4caf50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 16px;
  padding-right: 45px;
}