@import "../../../themes/ionic.globals.ios";

// iOS Action Sheet
// --------------------------------------------------

/// @prop - Text align of the action sheet
$action-sheet-ios-text-align: center !default;

/// @prop - Padding top of the action sheet
$action-sheet-ios-padding-top: 0 !default;

/// @prop - Padding end of the action sheet
$action-sheet-ios-padding-end: 10px !default;

/// @prop - Padding bottom of the action sheet
$action-sheet-ios-padding-bottom: $action-sheet-ios-padding-top !default;

/// @prop - Padding start of the action sheet
$action-sheet-ios-padding-start: $action-sheet-ios-padding-end !default;

/// @prop - Top margin of the action sheet button group
$action-sheet-ios-group-margin-top: 10px !default;

/// @prop - Bottom margin of the action sheet button group
$action-sheet-ios-group-margin-bottom: 10px !default;

/// @prop - Background color of the action sheet
$action-sheet-ios-background: #f9f9f9 !default;

/// @prop - Border color of the action sheet
$action-sheet-ios-border-color: #d6d6da !default;

/// @prop - Border radius of the action sheet
$action-sheet-ios-border-radius: 13px !default;

/// @prop - Padding of the action sheet title
$action-sheet-ios-title-padding: 15px !default;

/// @prop - Color of the action sheet title
$action-sheet-ios-title-color: #8f8f8f !default;

/// @prop - Font size of the action sheet title
$action-sheet-ios-title-font-size: 13px !default;

/// @prop - Font weight of the action sheet title
$action-sheet-ios-title-font-weight: 400 !default;

/// @prop - Border radius of the action sheet title
$action-sheet-ios-title-border-radius: 0 !default;

/// @prop - Minimum height of the action sheet button
$action-sheet-ios-button-min-height: 56px !default;

/// @prop - Padding of the action sheet button
$action-sheet-ios-button-padding: 18px !default;

/// @prop - Text color of the action sheet button
$action-sheet-ios-button-text-color: #007aff !default;

/// @prop - Font size of the action sheet button
$action-sheet-ios-button-font-size: 20px !default;

/// @prop - Border width of the action sheet button
$action-sheet-ios-button-border-width: $hairlines-width !default;

/// @prop - Border style of the action sheet button
$action-sheet-ios-button-border-style: solid !default;

/// @prop - Border color of the action sheet button
$action-sheet-ios-button-border-color: #d1d3d6 !default;

/// @prop - Background color of the action sheet button
$action-sheet-ios-button-background: transparent !default;

/// @prop - Background color of the activated action sheet button
$action-sheet-ios-button-background-activated: #ebebeb !default;

/// @prop - Destructive text color of the action sheet button
$action-sheet-ios-button-destructive-text-color: #f53d3d !default;

/// @prop - Background color of the action sheet cancel button
$action-sheet-ios-button-cancel-background: #fff !default;

/// @prop - Font weight of the action sheet cancel button
$action-sheet-ios-button-cancel-font-weight: 600 !default;

.action-sheet-ios {
  @include text-align($action-sheet-ios-text-align);
}

.action-sheet-ios .action-sheet-container {
  @include padding($action-sheet-ios-padding-top, $action-sheet-ios-padding-end, $action-sheet-ios-padding-bottom, $action-sheet-ios-padding-start);
}

.action-sheet-ios .action-sheet-group {
  background: $action-sheet-ios-background;
  @include border-radius($action-sheet-ios-border-radius);
  @include margin(null, null, $action-sheet-ios-group-margin-bottom - 2, null);
}

.action-sheet-ios .action-sheet-group:first-child {
  @include margin($action-sheet-ios-group-margin-top, null, null, null);
}

.action-sheet-ios .action-sheet-group:last-child {
  @include margin(null, null, $action-sheet-ios-group-margin-bottom, null);
}

.action-sheet-ios .action-sheet-title {
  font-size: $action-sheet-ios-title-font-size;
  font-weight: $action-sheet-ios-title-font-weight;
  color: $action-sheet-ios-title-color;
  border-bottom: $action-sheet-ios-button-border-width $action-sheet-ios-button-border-style $action-sheet-ios-border-color;
  @include padding($action-sheet-ios-title-padding);
  @include text-align($action-sheet-ios-text-align);
  @include border-radius($action-sheet-ios-title-border-radius);
  // 源文件没对此处理
  .action-sheet-sub-title {
    max-width: 90%;
    margin-top: 3%;
    margin-right: auto;
    margin-left: auto;
    font-size: 77%;
    line-height: 130%;
  }
}

.action-sheet-ios .action-sheet-button {
  min-height: $action-sheet-ios-button-min-height;
  font-size: $action-sheet-ios-button-font-size;
  color: $action-sheet-ios-button-text-color;
  background: $action-sheet-ios-button-background;
  border-bottom: $action-sheet-ios-button-border-width $action-sheet-ios-button-border-style $action-sheet-ios-border-color;
  @include margin(0);
  @include padding($action-sheet-ios-button-padding);
}

.action-sheet-ios .action-sheet-button:last-child {
  border-bottom-color: transparent;
}

.action-sheet-ios .action-sheet-button:active {
  background: $action-sheet-ios-button-background-activated;
  border-top: $action-sheet-ios-button-border-width $action-sheet-ios-button-border-style $action-sheet-ios-button-background-activated;
  border-bottom-color: $action-sheet-ios-button-background-activated;
  @include margin(-$action-sheet-ios-button-border-width, null, null, null);
}

.action-sheet-ios .action-sheet-selected {
  font-weight: bold;
  background: #fff;
}

.action-sheet-ios .action-sheet-destructive {
  color: $action-sheet-ios-button-destructive-text-color;
}

.action-sheet-ios .action-sheet-cancel {
  font-weight: $action-sheet-ios-button-cancel-font-weight;
  background: $action-sheet-ios-button-cancel-background;
}
