// iOS风格员工详情页面样式
.employee-detail-container {
  background: #f2f2f7;
  min-height: 100vh;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

// iOS风格导航栏
.ios-navbar {
  background: rgba(248, 248, 248, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;

  .nav-left {
    display: flex;
    align-items: center;
    gap: 12px;

    .back-button {
      background: none;
      border: none;
      padding: 8px;
      border-radius: 8px;
      color: #007AFF;
      cursor: pointer;
      transition: background-color 0.2s ease;

      &:hover {
        background: rgba(0, 122, 255, 0.1);
      }

      mat-icon {
        font-size: 20px;
        width: 20px;
        height: 20px;
      }
    }

    .nav-title {
      font-size: 17px;
      font-weight: 600;
      color: #000;
      margin: 0;
    }
  }

  .nav-right {
    .more-button {
      background: none;
      border: none;
      padding: 8px;
      border-radius: 8px;
      color: #007AFF;
      cursor: pointer;
      transition: all 0.2s ease;

      &:hover {
        background: rgba(0, 122, 255, 0.1);
      }

      mat-icon {
        font-size: 20px;
        width: 20px;
        height: 20px;
      }
    }
  }
}

// iOS风格头像区域
.ios-avatar-section {
  background: linear-gradient(135deg, #007AFF, #5856D6);
  padding: 32px 16px;
  text-align: center;
  color: white;

  .avatar-container {
    margin-bottom: 16px;

    .employee-avatar {
      width: 80px;
      height: 80px;
      border-radius: 40px;
      border: 3px solid rgba(255, 255, 255, 0.3);
      object-fit: cover;
    }
  }

  .employee-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
  }

  .employee-position {
    font-size: 16px;
    opacity: 0.8;
    margin-bottom: 20px;
  }

  .quick-actions {
    display: flex;
    justify-content: center;
    gap: 16px;

    .quick-action {
      background: rgba(255, 255, 255, 0.2);
      border: none;
      border-radius: 20px;
      padding: 8px 16px;
      color: white;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      gap: 6px;

      &:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: translateY(-1px);
      }

      mat-icon {
        font-size: 16px;
        width: 16px;
        height: 16px;
      }
    }
  }
}

// iOS风格分组
.ios-section {
  margin: 20px 16px;

  .section-header {
    padding: 0 16px 8px 16px;

    h3, h4 {
      font-size: 13px;
      font-weight: 400;
      color: #6d6d72;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin: 0;
    }
  }
}

// iOS风格列表
.ios-list {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);

  .list-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 0.5px solid rgba(60, 60, 67, 0.1);
    transition: background-color 0.2s ease;

    &:last-child {
      border-bottom: none;
    }

    &.clickable {
      cursor: pointer;

      &:hover {
        background: rgba(0, 0, 0, 0.04);
      }

      &:active {
        background: rgba(0, 0, 0, 0.08);
      }
    }

    &.selected {
      background: rgba(0, 122, 255, 0.1);

      .item-label {
        color: #007AFF;
        font-weight: 500;
      }
    }

    &.disabled {
      opacity: 0.5;
      cursor: not-allowed;

      &:hover {
        background: transparent;
      }
    }

    .item-icon {
      margin-right: 12px;
      color: #007AFF;

      mat-icon {
        font-size: 20px;
        width: 20px;
        height: 20px;
      }
    }

    .item-content {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 2px;

      .item-label {
        font-size: 17px;
        color: #000;
        font-weight: 400;
      }

      .item-value {
        font-size: 17px;
        color: #8e8e93;
        margin-left: auto;
      }
    }

    .item-action {
      margin-left: 8px;
      color: #c7c7cc;

      mat-icon {
        font-size: 18px;
        width: 18px;
        height: 18px;
      }
    }

    // 双行布局
    &.two-line .item-content {
      .item-label {
        font-size: 17px;
        color: #000;
      }

      .item-value {
        font-size: 15px;
        color: #8e8e93;
        margin-left: 0;
      }
    }
  }
}

// 状态徽章
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;

  &.status-active {
    background: #34c759;
    color: white;
  }

  &.status-probation {
    background: #ff9500;
    color: white;
  }

  &.status-resigned {
    background: #8e8e93;
    color: white;
  }

  &.screening-approved {
    background: #34c759;
    color: white;
  }

  &.screening-rejected {
    background: #ff3b30;
    color: white;
  }

  &.screening-pending {
    background: #ff9500;
    color: white;
  }
}

// iOS风格操作按钮
.ios-actions {
  padding: 20px 16px 32px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;

  .ios-action-button {
    background: white;
    border: none;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 500;
    color: #007AFF;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);

    &:hover {
      background: rgba(0, 0, 0, 0.04);
      transform: translateY(-1px);
    }

    &:active {
      background: rgba(0, 0, 0, 0.08);
      transform: translateY(0);
    }

    &.primary {
      background: #007AFF;
      color: white;

      &:hover {
        background: #0056b3;
      }
    }

    mat-icon {
      font-size: 20px;
      width: 20px;
      height: 20px;
    }
  }
}

// iOS风格文本域
.ios-textarea {
  background: white;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);

  textarea {
    width: 100%;
    border: none;
    outline: none;
    font-size: 17px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    background: transparent;

    &::placeholder {
      color: #c7c7cc;
    }
  }
}

// iOS风格模态框
.ios-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;

  &.show {
    opacity: 1;
    visibility: visible;

    .modal-content {
      transform: translateY(0);
    }
  }

  .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
  }

  .modal-content {
    background: #f2f2f7;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    position: relative;

    .modal-header {
      background: white;
      padding: 16px;
      border-bottom: 0.5px solid rgba(60, 60, 67, 0.1);
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-radius: 20px 20px 0 0;

      h3 {
        font-size: 17px;
        font-weight: 600;
        margin: 0;
        color: #000;
      }

      .close-button {
        background: none;
        border: none;
        padding: 8px;
        border-radius: 8px;
        color: #007AFF;
        cursor: pointer;

        &:hover {
          background: rgba(0, 122, 255, 0.1);
        }

        mat-icon {
          font-size: 20px;
          width: 20px;
          height: 20px;
        }
      }
    }

    .modal-body {
      padding: 20px 0;
    }

    .modal-actions {
      padding: 16px;
      display: flex;
      gap: 12px;

      .ios-button {
        flex: 1;
        background: white;
        border: none;
        border-radius: 10px;
        padding: 16px;
        font-size: 17px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;

        &.primary {
          background: #007AFF;
          color: white;

          &:hover {
            background: #0056b3;
          }
        }

        &.secondary {
          color: #007AFF;

          &:hover {
            background: rgba(0, 0, 0, 0.04);
          }
        }
      }
    }
  }
}

// 三点菜单样式（调整透明度）
:host ::ng-deep .mat-mdc-menu-panel {
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 12px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
  border: 0.5px solid rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

:host ::ng-deep .mat-mdc-menu-item {
  padding: 12px 16px !important;
  font-size: 17px !important;
  color: #000 !important;
  transition: background-color 0.2s ease !important;

  &:hover {
    background: rgba(0, 0, 0, 0.04) !important;
  }

  .mat-icon {
    margin-right: 12px !important;
    color: #007AFF !important;
    font-size: 20px !important;
    width: 20px !important;
    height: 20px !important;
  }

  &.delete-item {
    color: #ff3b30 !important;

    .mat-icon {
      color: #ff3b30 !important;
    }
  }
}

// 响应式设计
@media (max-width: 768px) {
  .ios-avatar-section {
    padding: 24px 16px;

    .employee-name {
      font-size: 20px;
    }

    .employee-position {
      font-size: 14px;
    }

    .quick-actions {
      flex-direction: column;
      align-items: center;
      gap: 8px;

      .quick-action {
        width: 100%;
        max-width: 200px;
        justify-content: center;
      }
    }
  }

  .ios-section {
    margin: 16px 12px;
  }

  .ios-actions {
    padding: 16px 12px 24px 12px;
  }
}

// 动画效果
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ios-section {
  animation: slideInUp 0.4s ease-out;

  &:nth-child(2) { animation-delay: 0.1s; }
  &:nth-child(3) { animation-delay: 0.2s; }
  &:nth-child(4) { animation-delay: 0.3s; }
}

.ios-avatar-section {
  animation: slideInUp 0.4s ease-out;
}