// ========== 颜色配置 ==========
$white: #fff;
$black: #000;

// ========== 尺寸配置 ==========
$full-size: 100%;

// ========== 样式定义 ==========
.comfirm-container {
  position: fixed;
  top: 0;
  left: 0;
  width: $full-size;
  height: $full-size;
  z-index: 9999;
  background-color: rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  .alert-bg {
    width: 50%;
    height: 30%;
    background-color: $white;
    border-radius: 10px;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    user-select: none;
    /* 根据屏幕缩放而缩放，同时响应宽度和高度变化 */
    /* 取宽度和高度计算结果的较小值，确保字体大小同时响应宽高变化 */
    /* 父div宽度 = 50vw，高度 = 30vh */
    /* 宽度比例：50vw * 0.04 = 父div宽度的4% */
    /* 高度比例：30vh * 0.08 = 父div高度的8% */
    font-size: min(calc(50vw * 0.04), calc(30vh * 0.08));

    .title {
      width: $full-size;
      height: $full-size;
      /* em单位精确相对于父元素.alert-bg的字体大小 */
      font-size: 2.5em;
      font-weight: bold;
      color: $black;
      display: flex;
      flex-direction: row;
      justify-content: center;
      align-items: center;
    }

    .content {
      width: $full-size;
      height: $full-size;
      display: flex;
      flex-direction: row;
      justify-content: center;
      align-items: center;
      /* em单位精确相对于父元素.alert-bg的字体大小 */
      font-size: 1.5em;
      color: $black;
    }

    .footer {
      width: $full-size;
      height: $full-size;
      display: flex;
      flex-direction: row;
      justify-content: center;
      align-items: center;

      .confirm-button {
        width: 30%;
        height: 80%;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
        border-radius: 10px;
        font-size: 1.5em;
        cursor: pointer;
        transition: all 0.3s;
        
        &:hover {
          background-color: rgba(0, 0, 0, 0.05);
          transform: scale(1.05);
        }
        
        &:active {
          transform: scale(0.95);
        }
      }
      .cancel-button {
        width: 30%;
        height: 80%;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
        border-radius: 10px;
        font-size: 1.5em;
        cursor: pointer;
        transition: all 0.3s;

        &:hover {
          background-color: rgba(0, 0, 0, 0.05);
          transform: scale(1.05);
        }
        
        &:active {
          transform: scale(0.95);
        }
      }
    }
  }
}
