@import "../../../themes/ionic.globals";

// Alerts
// --------------------------------------------------

/// @prop - Minimum width of the alert
$alert-min-width: 250px !default;

/// @prop - Maximum height of the alert
$alert-max-height: 90% !default;

/// @prop - Line height of the alert button
$alert-button-line-height: 20px !default;

/// @prop - Font size of the alert button
$alert-button-font-size: 14px !default;

/// @prop - Color of the alert input placeholder
$alert-input-placeholder-color: #999 !default;

.ion-alert {
  position: fixed;
  z-index: $z-index-overlay + $z-index-overlay-alert;
  display: flex;
  align-items: center;
  justify-content: center;
  contain: strict;
  
  @include position(0, 0, 0, 0);
}

.ion-alert.alert-top {
  align-items: flex-start;
  
  @include padding(50px, null, null, null);
}

.ion-alert input {
  width: 100%;
}

.alert-wrapper {
  position: relative;
  
  z-index: $z-index-overlay-wrapper;
  display: flex;
  min-width: $alert-min-width;
  max-height: $alert-max-height;
  margin-bottom: 40px;
  flex-direction: column;
  
  // make sure this layer is in the top
  opacity: 1;
  
  // addStyle
  transition: all ease-in-out 200ms;
  contain: content;
  
  .alert-image {
    width: 100%;
  }
}

.alert-title {
  @include margin(0);
  @include padding(0);
}

.alert-sub-title {
  font-weight: normal;
  
  @include margin(5px, 0, 0);
  @include padding(0);
}

.alert-message {
  overflow-y: scroll;
  line-height: 130%;
  -webkit-overflow-scrolling: touch;
}

.alert-input {
  background: inherit;
  border: 0;
  
  @include placeholder($alert-input-placeholder-color);
  @include padding(10px, 0);
}

.alert-button-group {
  display: flex;
  flex-direction: row;
}

.alert-button-group-vertical {
  flex-flow: column nowrap;
}

.alert-button {
  z-index: 0;
  display: block;
  font-size: $alert-button-font-size;
  line-height: $alert-button-line-height;
  
  @include margin(0);
}

.alert-tappable {
  width: 100%;
  font-size: inherit;
  line-height: initial;
  background: transparent;
  
  @include text-align(start);
  @include appearance(none);
  @include margin(0);
  @include padding(0);
}
