/* MobSeen styling for Identity Server pages */

:root {
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --background-light: #f8f9fa;
  --background-dark: #343a40;
  --text-light: #f8f9fa;
  --text-dark: #343a40;
  --error-color: #dc3545;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
}

/* Base styles */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  font-size: 15px;
  overflow-y: scroll;
  overscroll-behavior-y: none;
}

body {
  background-color: #f8f9fa;
  color: #343a40;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  line-height: 1.5;
}

.dark-mode body {
  background-color: #343a40;
  color: #f8f9fa;
}

/* Utility classes */
.flex-it {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-basis: auto;
  flex-shrink: 0;
  position: relative;
}

.flex-row {
  flex-direction: row;
}

.justify-between {
  justify-content: space-between;
}

.items-center {
  align-items: center;
}

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

.min-h-screen {
  min-height: 100vh;
}

.p-4 {
  padding: 1rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.text-xl {
  font-size: 1.25rem;
}

.font-bold {
  font-weight: 700;
}

.rounded-lg {
  border-radius: 0.5rem;
}

.shadow-md {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.bg-white {
  background-color: #fff;
}

.dark-mode .bg-white {
  background-color: #1a1a1a;
}

.bg-gray-100 {
  background-color: #f3f4f6;
}

.dark-mode .bg-gray-100 {
  background-color: #374151;
}

.text-gray-600 {
  color: #4b5563;
}

.dark-mode .text-gray-600 {
  color: #d1d5db;
}

.backdrop-blur-md {
  backdrop-filter: blur(12px);
}

.bg-opacity-70 {
  --tw-bg-opacity: 0.7;
}

.dark-mode .bg-opacity-40 {
  --tw-bg-opacity: 0.4;
}

.center-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Navigation */
.nav-page {
  background-color: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
}

.dark-mode .nav-page {
  background-color: #1f2937;
  border-bottom: 1px solid #374151;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.navbar-brand {
  display: flex;
  align-items: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: #4b5563;
  text-decoration: none;
}

.dark-mode .navbar-brand {
  color: #f3f4f6;
}

.navbar-brand img, .navbar-brand svg {
  margin-right: 0.5rem;
}

.user-menu {
  display: flex;
  align-items: center;
}

.user-name {
  margin-right: 1rem;
  font-weight: 500;
}

.user-actions {
  display: flex;
}

.nav-link {
  color: #4b5563;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
  transition: background-color 0.2s;
}

.nav-link:hover {
  background-color: rgba(0, 0, 0, 0.05);
  text-decoration: none;
}

.dark-mode .nav-link {
  color: #f3f4f6;
}

.dark-mode .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Form styling */
.form-group {
  margin-bottom: 1rem;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.dark-mode .form-control {
  color: #f3f4f6;
  background-color: #374151;
  border-color: #4b5563;
}

.form-control:focus {
  color: #495057;
  background-color: #fff;
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.dark-mode .form-control:focus {
  color: #f3f4f6;
  background-color: #374151;
  border-color: #93c5fd;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.checkbox-container {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.checkbox-container input[type="checkbox"] {
  margin-right: 0.5rem;
}

/* Button styling */
.button {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.625rem 1.25rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  text-decoration: none;
  min-width: 120px;
}

.button:hover {
  text-decoration: none;
}

.primary-button {
  color: #fff;
  background-color: #007bff;
  border-color: #007bff;
}

.primary-button:hover {
  color: #fff;
  background-color: #0069d9;
  border-color: #0062cc;
}

.secondary-button {
  color: #fff;
  background-color: #6c757d;
  border-color: #6c757d;
}

.secondary-button:hover {
  color: #fff;
  background-color: #5a6268;
  border-color: #545b62;
}

.button-group {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* Card styling */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: #fff;
  background-clip: border-box;
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.dark-mode .card {
  background-color: #1f2937;
  border-color: rgba(255, 255, 255, 0.125);
}

.card-header {
  padding: 1rem 1.25rem;
  margin-bottom: 0;
  background-color: rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.dark-mode .card-header {
  background-color: rgba(255, 255, 255, 0.03);
  border-bottom-color: rgba(255, 255, 255, 0.125);
}

.card-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.card-body {
  flex: 1 1 auto;
  padding: 1.5rem;
}

/* Login and logout page specific styling */
.login-page, .logout-page, .logged-out-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.login-page .lead, .logout-page .lead, .logged-out-page .lead {
  margin-bottom: 2rem;
  text-align: center;
}

.login-page .lead h1, .logout-page .lead h1, .logged-out-page .lead h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.login-page .lead p, .logout-page .lead p, .logged-out-page .lead p {
  font-size: 1.25rem;
  color: #6c757d;
  margin-top: 0.5rem;
}

.dark-mode .login-page .lead p, 
.dark-mode .logout-page .lead p, 
.dark-mode .logged-out-page .lead p {
  color: #d1d5db;
}

.auth-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.auth-panel {
  flex: 1 1 350px;
  max-width: 100%;
}

@media (min-width: 768px) {
  .auth-panel {
    max-width: calc(50% - 0.75rem);
    min-width: 350px;
  }
}

.links-container {
  margin-top: 1.5rem;
}

.links-container p {
  margin: 0.5rem 0;
}

.external-providers {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.external-button {
  width: 100%;
}

.redirect-container {
  margin: 1rem 0;
}

/* Container styling */
.container {
  width: 100%;
  padding-right: 1rem;
  padding-left: 1rem;
  margin-right: auto;
  margin-left: auto;
}

@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

.body-container {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 60px);
  justify-content: center;
  align-items: center;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* Links */
a {
  color: #007bff;
  text-decoration: none;
  background-color: transparent;
  transition: color 0.15s ease-in-out;
}

a:hover {
  color: #0056b3;
  text-decoration: underline;
}

.dark-mode a {
  color: #93c5fd;
}

.dark-mode a:hover {
  color: #bfdbfe;
}

/* Alert messages */
.alert-message {
  position: relative;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 0.25rem;
}

.alert-message.error {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

.dark-mode .alert-message.error {
  color: #f8d7da;
  background-color: #721c24;
  border-color: #a52a37;
}

.alert-message.warning {
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeeba;
}

.dark-mode .alert-message.warning {
  color: #fff3cd;
  background-color: #856404;
  border-color: #b69e00;
}

.alert-message.success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

.dark-mode .alert-message.success {
  color: #d4edda;
  background-color: #155724;
  border-color: #2a9d47;
}

.alert-message strong {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* Validation */
.validation-summary-errors {
  color: #dc3545;
  margin-bottom: 1rem;
}

.dark-mode .validation-summary-errors {
  color: #f87171;
}

.validation-summary-errors ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
  margin-top: 0.5rem;
}

.validation-errors {
  margin-top: 0.5rem;
}

.validation-errors ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.validation-errors li {
  margin-bottom: 0.25rem;
}

/* Iframe for signout */
.signout {
  display: none;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .button-group {
    flex-direction: column;
  }
  
  .button {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}
