/**
 * User Pages Styling
 * Styles for login, register, and password reset pages
 */

/* Main content wrapper for user pages */
.path-user .region-content {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

/* Local tasks (tabs) styling - compact inline tabs */
.path-user .block-local-tasks-block {
  margin-bottom: 0;
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.path-user .tabs-wrapper {
  background-color: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.path-user .tabs-wrapper .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.path-user .tabs-wrapper .nav-tabs {
  border: none;
  gap: 0;
  margin: 0;
  padding: 0;
  display: inline-flex;
  flex-wrap: nowrap;
}

.path-user .tabs-wrapper .nav-item {
  flex: 0 0 auto;
  margin: 0;
  border-right: 1px solid #dee2e6;
}

.path-user .tabs-wrapper .nav-item:last-child {
  border-right: none;
}

.path-user .tabs-wrapper .nav-link {
  border: none;
  border-radius: 0;
  color: #495057;
  font-weight: 500;
  padding: 0.625rem 1rem;
  text-align: center;
  background-color: transparent;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
  font-size: 0.9rem;
  white-space: nowrap;
}

.path-user .tabs-wrapper .nav-link:hover {
  background-color: #e9ecef;
  color: #18453b;
}

.path-user .tabs-wrapper .nav-link.active,
.path-user .tabs-wrapper .nav-link.is-active {
  background-color: #ffffff;
  color: #18453b;
  font-weight: 600;
  border-bottom-color: #18453b;
}

/* Form container styling - only for login/register/password forms */
.path-user .block-system-main-block {
  background-color: #ffffff;
  border-radius: 0;
  padding: 3rem 1rem;
  box-shadow: none;
  border: none;
}

/* Narrow layout for form pages only (login, register, password) */
.path-user-login .block-system-main-block,
.path-user-register .block-system-main-block,
.path-user-password .block-system-main-block {
  max-width: 500px;
  margin: 0;
}

/* Full width for pages with tables */
.path-user .block-system-main-block:has(table) {
  max-width: 100%;
  padding: 2rem 1rem;
}

/* Form styling */
.path-user .user-login-form,
.path-user .user-register-form,
.path-user .user-pass {
  margin: 0;
}

/* Form elements */
.path-user .form-item {
  margin-bottom: 1.5rem;
}

.path-user .form-element-label {
  display: block;
  margin-bottom: 0.5rem;
  color: #212529;
  font-weight: 600;
  font-size: 0.95rem;
}

.path-user .form-text,
.path-user .form-email,
.path-user .form-tel,
.path-user .form-number,
.path-user .form-url {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #495057;
  background-color: #ffffff;
  border: 1px solid #ced4da;
  border-radius: 0;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.path-user .form-text:focus,
.path-user .form-email:focus,
.path-user .form-tel:focus,
.path-user .form-number:focus,
.path-user .form-url:focus {
  border-color: #18453b;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(24, 69, 59, 0.15);
}

/* Error state */
.path-user .form-text.error,
.path-user .form-email.error,
.path-user input[aria-invalid="true"] {
  border-color: #dc3545;
}

.path-user .form-text.error:focus,
.path-user .form-email.error:focus,
.path-user input[aria-invalid="true"]:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

/* Error messages */
.path-user .field-error-message,
.path-user .invalid-feedback {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #dc3545;
  font-weight: 500;
}

/* Required indicator */
.path-user .form-required,
.path-user .required-indicator {
  color: #dc3545;
  margin-left: 0.25rem;
}

/* Submit button */
.path-user .form-actions {
  margin-top: 2rem;
  margin-bottom: 0;
}

.path-user .form-submit,
.path-user .btn-msu {
  display: inline-block;
  width: auto;
  min-width: 150px;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  color: #ffffff;
  background-color: #18453b;
  border: 1px solid #18453b;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.path-user .form-submit:hover,
.path-user .btn-msu:hover {
  background-color: #0f2e27;
  border-color: #0f2e27;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.path-user .form-submit:focus,
.path-user .btn-msu:focus {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(24, 69, 59, 0.25);
}

.path-user .form-submit:active,
.path-user .btn-msu:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Description text */
.path-user .description {
  font-size: 0.875rem;
  color: #6c757d;
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* Messages block */
.path-user .messages {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 0;
  border: 1px solid transparent;
}

.path-user .messages--status {
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

.path-user .messages--error {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

.path-user .messages--warning {
  background-color: #fff3cd;
  border-color: #ffeaa7;
  color: #856404;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .path-user .tabs-wrapper .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  .path-user .block-system-main-block {
    padding: 2rem 1rem;
  }
}

@media (max-width: 576px) {
  .path-user .tabs-wrapper .nav-link {
    padding: 0.5rem;
    font-size: 0.8rem;
  }

  .path-user .block-system-main-block {
    padding: 1.5rem 1rem;
  }
}

/* Accessibility improvements */
.path-user .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus visible for keyboard navigation */
.path-user *:focus-visible {
  outline: 2px solid #18453b;
  outline-offset: 2px;
}

/* Loading state */
.path-user .form-submit:disabled,
.path-user .btn-msu:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  background-color: #6c757d;
  border-color: #6c757d;
}

/* Additional form elements */
.path-user .form-type-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.path-user .form-type-checkbox input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
  accent-color: #18453b;
}

.path-user .form-type-checkbox label {
  margin-bottom: 0;
  cursor: pointer;
  font-weight: 400;
}

/* Help text */
.path-user .form-item .help-text {
  font-size: 0.875rem;
  color: #6c757d;
  margin-top: 0.25rem;
  font-style: italic;
}

/* Table pages styling */
.path-user .table-responsive {
  margin-top: 1rem;
  background-color: #ffffff;
}

.path-user .responsive-enabled {
  width: 100%;
  border-collapse: collapse;
}

.path-user .responsive-enabled thead {
  background-color: #f8f9fa;
}

.path-user .responsive-enabled th {
  font-weight: 600;
  color: #212529;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid #dee2e6;
  text-align: left;
  font-size: 0.9rem;
}

.path-user .responsive-enabled td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e9ecef;
  color: #495057;
}

.path-user .responsive-enabled tr:hover {
  background-color: #f8f9fa;
}

.path-user .responsive-enabled tr.odd {
  background-color: #ffffff;
}

.path-user .responsive-enabled tr.even {
  background-color: #fafbfc;
}

.path-user .responsive-enabled tr:hover {
  background-color: #f1f3f5;
}

/* Pagination styling */
.path-user .pager {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.path-user .pagination {
  gap: 0.25rem;
  flex-wrap: wrap;
}

.path-user .page-item .page-link {
  padding: 0.5rem 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 0;
  color: #18453b;
  transition: all 0.2s ease;
  min-width: 40px;
  text-align: center;
}

.path-user .page-item .page-link:hover {
  background-color: #e9ecef;
  border-color: #18453b;
}

.path-user .page-item.is-active .page-link,
.path-user .page-item.active .page-link {
  background-color: #18453b;
  border-color: #18453b;
  color: #ffffff;
  font-weight: 600;
}

.path-user .page-item.disabled .page-link {
  color: #6c757d;
  pointer-events: none;
  background-color: #ffffff;
  border-color: #dee2e6;
}

/* Container for table pages */
.path-user .block-system-main-block:has(table) .table-responsive {
  border-radius: 0;
  overflow: hidden;
  border: 1px solid #e9ecef;
}

/* Make tabs container wider for table pages */
.path-user .block-system-main-block:has(table) ~ * .tabs-wrapper .container,
.path-user:has(.responsive-enabled) .tabs-wrapper .container {
  max-width: 100%;
}

/* Add container wrapper for table pages */
.path-user .block-system-main-block:has(table) {
  max-width: 1400px;
  margin: 0 auto;
}

/* Adjust responsive table scrolling */
.path-user .table-responsive[tabindex="0"] {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Style for username links in tables */
.path-user .responsive-enabled .username {
  color: #18453b;
  font-weight: 500;
  text-decoration: none;
}

.path-user .responsive-enabled .username:hover {
  text-decoration: underline;
}
