/* Dialog */

.dialog
{
  border: 1px solid gray;
  background: white;
  z-index: 10001;
  -webkit-box-shadow: 2px 2px 30px 0px rgba(50, 50, 50, 0.63);
  -moz-box-shadow: 2px 2px 30px 0px rgba(50, 50, 50, 0.63);
  box-shadow: 2px 2px 30px 0px rgba(50, 50, 50, 0.63);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 8px);
  max-height: calc(100% - 8px);
  animation-name: fade_in_dialog;
  animation-duration: 0.5s;
  animation-fill-mode: forwards;
  display: flex;
  flex-direction: column;
}

.dialog.maximized
{
  top: 4px;
  left: 4px;
  transform: none;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
}

div.dialog.maximized > .header > button.maximize
{
  display: none;
}

div.dialog.maximized > .header > button.minimize
{
  display: block;
}

div.dialog > .header > button.minimize
{
  display: none;
}

.dialog_curtain
{
  z-index: 10000;
  opacity: 0;
  position: absolute;
  top:0;
  bottom:0;
  left:0;
  right:0;
  background-color: gray;
    -webkit-box-shadow: 2px 2px 30px 0px rgba(50, 50, 50, 0.63);
  -moz-box-shadow: 2px 2px 30px 0px rgba(50, 50, 50, 0.63);
  box-shadow: 2px 2px 30px 0px rgba(50, 50, 50, 0.63);
  -webkit-user-select: none;
  -moz-user-select: none;
  -khtml-user-select: none;
  -ms-user-select: none;
  animation: fade_in_curtain;
  animation-duration: 0.5s;
  animation-fill-mode: forwards;
}

.dialog > .header
{
  flex-grow: 0;
  padding: 1px;
  flex-wrap: wrap;
  background-color: white;
  border-bottom: 1px solid #e0e0e0;
  font-weight: bold;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  -webkit-user-select: none;
  -moz-user-select: none;
  -khtml-user-select: none;
  -ms-user-select: none;
}

.dialog .body
{
  flex-grow: 1;
  overflow:auto;
  padding: 6px;
}

.dialog > .footer
{
  flex-grow: 0;
  flex-wrap: wrap;
  padding: 4px;
  display: flex;
  border-top: 1px solid #e0e0e0;
  align-items: center;
  justify-content: center;
  -webkit-user-select: none;
  -moz-user-select: none;
  -khtml-user-select: none;
  -ms-user-select: none;
}

div.dialog > .header > .title
{
  flex-grow: 1;
  text-align: center;
}

div.dialog > .header > .title > a
{
  -webkit-user-drag: none;
}

div.dialog > .header > button
{
  flex-grow: 0;
  width: 16px;
  height: 16px;
  margin: 4px;
  padding:0;
  background-image: url(images/close.svg);
  background-repeat: no-repeat;
  background-size: 10px 10px;
  background-position: center center;
  cursor: pointer;
  border-radius: 2px;
  background-color: #f6f6f6;
  border:none;
  box-shadow: none;
}

div.dialog > .header > button.minimize
{
  background-image: url(images/minimize.svg);
}

div.dialog > .header > button.maximize
{
  background-image: url(images/maximize.svg);
}

div.dialog > .header > button:hover
{
  background-color: #ffb0b0;
}

div.dialog > .header > button:focus
{
  outline:1px dotted black;
}

.dialog .body > div
{
  margin-top: 4px;
}

.dialog .body > div > input[type='text'],
.dialog .body > div > input[type='password']
{
  width:100%;
  box-sizing: border-box;
}

.dialog .body .text_field,
.dialog .body .select_field,
.dialog .body .radio_buttons
{
  width: 100%;
  box-sizing: border-box;
}

.dialog .body .select_field select
{
  border: 1px solid #C0C0C0;
  background-color: white;
  border-radius: 2px;
  padding: 2px 4px 2px 2px;
  width: 100%;
  box-sizing: border-box;
}

.dialog .body .list_field select
{
  -webkit-appearance:none;
  -moz-appearance: none;
  font-size: 14px;
  padding: 2px 4px 2px 4px;
  background: white;
  border-radius: 2px;
  width: 100%;
  box-sizing: border-box;
}

.dialog .body .text_field label,
.dialog .body .select_field label
{
  display: block;
}

.dialog .body .checkbox_field label,
.dialog .body .checkbox_field input
{
  vertical-align: middle;
}

.dialog .body div input,
.dialog .body div select
{
  margin-top:2px;
}

.dialog .body pre
{
  width: 100%;
  color: black;
  margin:0;
  box-sizing: border-box;
}

.dialog .body .code > input[type=text]
{
  font-family: monospace;
  font-size: 13px;
  color: #404040;
}

.dialog .body span.row
{
  display:block;
  text-align: left;
}

.dialog .body .radio_buttons > input[type='radio']
{
  float: left;
  clear: both;
  line-height: 20px;
}

.dialog .body .radio_buttons > label
{
  float: left;
  line-height: 20px;
  margin-left: 2px;
}

.dialog .footer > button
{
  margin-left:4px;
  margin-right:4px;
}

.dialog .body.confirm,
.dialog .body.info,
.dialog .body.error
{
  text-align: center;
  display:flex;
  flex-direction: column;
  align-items: center;
  word-break: break-word;
  user-select: text;
}

.dialog .body.confirm span,
.dialog .body.info span,
.dialog .body.error span
{
  margin-top:auto;
  margin-bottom: auto;
  user-select: text;
}

.dialog .body.error span
{
  color: #C00000;
}

.dialog .body.confirm span
{
  color: #D00000;
}

.dialog input[type="text"]
{
  border: 1px solid #C0C0C0;
}

.dialog .error
{
  color: #C00000;
}

.dialog .block
{
  display: block;
  text-align: center;
}

.dialog div.console
{
  font-family: monospace;
  font-size: 14px;
  color: #404040;
  border: 1px solid #C0C0C0;
  border-radius: 2px;
  padding: 2px 4px 2px 2px;
  width: 100%;
  box-sizing: border-box;
  overflow: auto;
}

.dialog div.console div.info
{
  color: #808080;
}

.dialog div.console div.warn
{
  color: #C0C000;
}

.dialog div.console div.error
{
  color: #C00000;
}

@keyframes fade_in_dialog
{
  0% {opacity: 0; visibility: visible; }
  100% {opacity: 1; }
}

@keyframes fade_in_curtain
{
  0% {opacity: 0; visibility: visible; }
  100% {opacity: 0.4; }
}

/* Login Dialog Styles */

.login_dialog_curtain,
.register_dialog_curtain
{
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background-color: rgba(0, 0, 0, 0.4);
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 10000 !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  padding: 0 !important;
  margin: 0 !important;
}

.login_dialog,
.register_dialog
{
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  width: 420px !important;
  height: auto !important;
  max-width: 420px;
  max-height: 90vh;
  animation: none;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 99999 !important;
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
}

.login_body,
.register_body
{
  padding: 0;
  overflow: visible;
  background: transparent;
  width: 100%;
  height: 100%;
}

.login_main_container,
.register_main_container
{
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.login_header_banner,
.register_header_banner
{
  background-color: #DC2626;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border-radius: 8px 8px 0 0;
}

.logo_container
{
  display: flex;
  align-items: center;
  gap: 16px;
}

.bimrocket_logo
{
  width: 235px;
  height: 56px;
  filter: brightness(0) invert(1);
  object-fit: contain;
}

.login_cards_container
{
  background-color: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.login_card
{
  background-color: #F9FAFB;
  padding: 24px;
}

.signup_card
{
  background-color: white;
  padding: 24px;
  text-align: center;
  border-top: 1px solid #E5E7EB;
}

.field_container
{
  margin-bottom: 20px;
}

.field_label
{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.field_label span
{
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.info_icon
{
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #E5E7EB;
  color: #6B7280;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  cursor: help;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.field_input
{
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font-size: 15px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-sizing: border-box;
  background-color: white;
  transition: all 0.2s ease-in-out;
}

.field_input:focus
{
  outline: none;
  border-color: #DC2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.field_input::placeholder
{
  color: #9CA3AF;
}

.login_error
{
  color: #DC2626;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.login_success
{
  color: #059669;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.login_button,
.signup_button
{
  width: 100%;
  height: 48px;
  background-color: #DC2626;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.login_button:hover,
.signup_button:hover
{
  background-color: #B91C1C;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.login_button:active,
.signup_button:active
{
  transform: translateY(0);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.login_button:focus,
.signup_button:focus
{
  outline: none;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.forgot_password_link
{
  display: block;
  text-align: center;
  margin-top: 16px;
  color: #374151;
  font-size: 14px;
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.forgot_password_link:hover
{
  color: #EF4444;
  text-decoration: underline;
}

.signup_text
{
  color: #374151;
  font-size: 14px;
  margin: 0 0 16px 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Register Dialog Specific Styles */

.register_title_container
{
  padding: 32px 24px 0 24px;
  text-align: center;
}

.register_title
{
  color: #111827;
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.register_card
{
  background-color: white;
  padding: 24px;
  border-radius: 0 0 8px 8px;
}

.register_buttons_container
{
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.register_button
{
  width: 100%;
  height: 48px;
  background-color: #DC2626;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.register_button:hover
{
  background-color: #B91C1C;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.register_button:active
{
  transform: translateY(0);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.register_button:focus
{
  outline: none;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.register_button:disabled
{
  background-color: #9CA3AF;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.cancel_button
{
  width: 100%;
  height: 48px;
  background-color: white;
  color: #6B7280;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cancel_button:hover
{
  background-color: #F9FAFB;
  border-color: #9CA3AF;
  color: #374151;
}

.cancel_button:active
{
  background-color: #F3F4F6;
}

.cancel_button:focus
{
  outline: none;
  box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.1);
}

.register_error
{
  color: #DC2626;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Responsive design */
@media (max-width: 480px)
{
  .login_dialog,
  .register_dialog
  {
    width: 100% !important;
    max-width: 100%;
    height: 100vh !important;
    max-height: 100vh;
    border-radius: 0;
  }

  .login_header_banner,
  .register_header_banner
  {
    border-radius: 0;
  }

  .login_cards_container
  {
    border-radius: 0;
    flex: 1;
    overflow-y: auto;
  }

  .register_main_container
  {
    height: 100vh;
    display: flex;
    flex-direction: column;
  }

  .register_card
  {
    flex: 1;
    overflow-y: auto;
  }
}

