/* General Styles */
body {
  font-family: Arial, sans-serif;
  background-color: #f3f4f6;
  margin: 0;
  padding: 0;
}

.cr-navigation {
  text-align: center;
  margin: 20px 0;
}

.cr-navigation button {
  background-color: #187181;
  color: white;
  border: none;
  padding: 10px 20px;
  margin: 0 5px;
  cursor: pointer;
  border-radius: 5px;
  font-size: 16px;
  transition: background-color 0.3s;
}

.cr-navigation button:hover {
  background-color: #185e81;
}

.cr-form {
  width: 100%;
  max-width: 700px; /* Increased max-width to give more space */
  margin: 20px auto;
  background-color: white;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  text-align: center; /* Center the content inside the form */
}

/* Style for the form header */
.form-header {
  display: flex;
  align-items: center;
  justify-content: center; /* Center items horizontally */
  margin-bottom: 20px;
  width: 100%;
  gap: 15px;
}

/* Style for the logo */
.form-logo {
  width: 50px; /* Adjust size as needed */
  height: 50px; /* Maintain aspect ratio */
  border-radius: 50%; /* Optional: make the logo circular */
}

/* Ensure h3 is always centered inside the form-header and cr-form */
.form-header h3,
.cr-form h3 {
  margin: 0;
  font-size: 18px;
  color: #333;
  font-weight: bold;
  text-align: center;
  width: 100%;
  flex: 1 1 0%;
  display: block;
}

/* Remove flex shrink on logo to avoid shrinking it too much */
.form-header .form-logo {
  flex-shrink: 0;
}

.cr-form form p {
  margin: 15px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: center;
}

.cr-form form label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #333;
  text-align: right; /* Align labels to the right */
  padding-right: 10px; /* Add padding to the right of the labels */
  flex: 1;
}

.cr-form form input[type="text"],
.cr-form form input[type="email"],
.cr-form form input[type="password"],
.cr-form form input[type="date"],
.cr-form form input[type="number"] {
  width: calc(100% - 20px);
  padding: 8px; /* Reduce padding to reduce height */
  margin: 0;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-sizing: border-box;
  transition: border-color 0.3s;
  flex: 2;
}

.cr-form form input[type="submit"] {
  background-color: #187181;
  color: white;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 5px;
  font-size: 16px;
  transition: background-color 0.3s;
  display: inline-block; /* Ensure buttons align properly */
  margin: 5px 35%;
}

.cr-form form input[type="submit"]:hover {
  background-color: #185e81;
}

.cr-form form p a {
  color: #187181;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
}

.cr-form form p a:hover {
  text-decoration: underline;
}

.cr-form form p.centered-bottom {
  text-align: center;
  font-weight: bold;
  margin-top: 20px;
  display: flex;
  justify-content: center; /* Center the class centered-bottom */
}

#registration_error,
#login_error {
  color: red;
  font-weight: bold;
  margin: 10px 0;
}

/* Responsive Styles */
@media (max-width: 600px) {
  .cr-form {
      padding: 10px;
  }

  .form-header {
      flex-direction: column;
      gap: 8px;
  }

  .form-header h3,
  .cr-form h3 {
      font-size: 18px;
  }

  .cr-form form p {
      margin: 10px 0;
      flex-direction: column;
      align-items: stretch;
  }

  .cr-form form label {
      text-align: right;
      padding-right: 0;
      margin-bottom: 3px;
  }

  .cr-form form input[type="text"],
  .cr-form form input[type="email"],
  .cr-form form input[type="password"],
  .cr-form form input[type="date"],
  .cr-form form input[type="number"] {
      width: 100%;
      padding: 6.4px; /* Reduce padding for smaller screens */
  }

  .cr-form form input[type="submit"] {
      padding: 8px 16px;
      font-size: 14px;
      margin: 8px auto;
      display: block;
      width: auto;
  }

  .cr-navigation button {
      padding: 8px 16px;
      font-size: 14px;
  }
}
/* Official notice box */
.cr-notice {
    border: 2px solid;
    border-radius: 6px;
    margin: 15px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    font-family: Tahoma, Arial, sans-serif;
    direction: rtl;
    overflow: hidden;
}

.cr-notice-header {
    color: #fff;
    padding: 10px;
    font-weight: bold;
    text-align: center;
    font-size: 18px;
}

.cr-notice-body {
    padding: 20px;
    text-align: center;
    font-size: 16px;
    line-height: 1.8;
}

/* Success (blue) */
.cr-success {
    border-color: #004085;
    background: #f8f9fa;
}
.cr-success .cr-notice-header {
    background: #004085;
}
.cr-success .cr-notice-body strong {
    color: #004085;
    font-size: 18px;
}

/* Error (red) */
.cr-error {
    border-color: #721c24;
    background: #f8d7da;
}
.cr-error .cr-notice-header {
    background: #721c24;
}
.cr-error .cr-notice-body {
    color: #721c24;
}
